cosmopolitan
cosmopolitan copied to clipboard
Bug: Missing __extendhftf2
Contact Details
No response
What happened?
QtBase build with tests fails to build due to the linker complaining that __extendhftf2 is not found.
Version
cosmocc 14.1.0
What operating system are you seeing the problem on?
No response
Relevant log output
No response
By taking the extendhftf2.c and adapting it to cosmopolitan libc code like this:
//===-- lib/extendhftf2.c - half -> quad conversion ---------------*- C -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
__static_yoink("huge_compiler_rt_license");
#define QUAD_PRECISION
#include "third_party/compiler_rt/fp_lib.inc"
#define SRC_HALF
#define DST_QUAD
#define tf_float long double
#include "third_party/compiler_rt/fp16_extend_impl.inc"
COMPILER_RT_ABI dst_t __extendhftf2(src_t a) {
return __extendXfYf2__(a);
}
The linker error goes away.