blob: 799b23b117092aa4fc9ed9eb56cf8e55722f0d4e [file] [log] [blame] [edit]
package(default_visibility = ["//visibility:public"])
cc_library(
name = "pico_float",
srcs = [
"float_aeabi.S",
"float_init_rom.c",
"float_math.c",
"float_v1_rom_shim.S",
],
hdrs = ["include/pico/float.h"],
includes = ["include"],
linkopts = [
"-Wl,--wrap=__aeabi_fadd",
"-Wl,--wrap=__aeabi_fdiv",
"-Wl,--wrap=__aeabi_fmul",
"-Wl,--wrap=__aeabi_frsub",
"-Wl,--wrap=__aeabi_fsub",
"-Wl,--wrap=__aeabi_cfcmpeq",
"-Wl,--wrap=__aeabi_cfrcmple",
"-Wl,--wrap=__aeabi_cfcmple",
"-Wl,--wrap=__aeabi_fcmpeq",
"-Wl,--wrap=__aeabi_fcmplt",
"-Wl,--wrap=__aeabi_fcmple",
"-Wl,--wrap=__aeabi_fcmpge",
"-Wl,--wrap=__aeabi_fcmpgt",
"-Wl,--wrap=__aeabi_fcmpun",
"-Wl,--wrap=__aeabi_i2f",
"-Wl,--wrap=__aeabi_l2f",
"-Wl,--wrap=__aeabi_ui2f",
"-Wl,--wrap=__aeabi_ul2f",
"-Wl,--wrap=__aeabi_f2iz",
"-Wl,--wrap=__aeabi_f2lz",
"-Wl,--wrap=__aeabi_f2uiz",
"-Wl,--wrap=__aeabi_f2ulz",
"-Wl,--wrap=__aeabi_f2d",
"-Wl,--wrap=sqrtf",
"-Wl,--wrap=cosf",
"-Wl,--wrap=sinf",
"-Wl,--wrap=tanf",
"-Wl,--wrap=atan2f",
"-Wl,--wrap=expf",
"-Wl,--wrap=logf",
"-Wl,--wrap=ldexpf",
"-Wl,--wrap=copysignf",
"-Wl,--wrap=truncf",
"-Wl,--wrap=floorf",
"-Wl,--wrap=ceilf",
"-Wl,--wrap=roundf",
"-Wl,--wrap=sincosf",
"-Wl,--wrap=asinf",
"-Wl,--wrap=acosf",
"-Wl,--wrap=atanf",
"-Wl,--wrap=sinhf",
"-Wl,--wrap=coshf",
"-Wl,--wrap=tanhf",
"-Wl,--wrap=asinhf",
"-Wl,--wrap=acoshf",
"-Wl,--wrap=atanhf",
"-Wl,--wrap=exp2f",
"-Wl,--wrap=log2f",
"-Wl,--wrap=exp10f",
"-Wl,--wrap=log10f",
"-Wl,--wrap=powf",
"-Wl,--wrap=powintf",
"-Wl,--wrap=hypotf",
"-Wl,--wrap=cbrtf",
"-Wl,--wrap=fmodf",
"-Wl,--wrap=dremf",
"-Wl,--wrap=remainderf",
"-Wl,--wrap=remquof",
"-Wl,--wrap=expm1f",
"-Wl,--wrap=log1pf",
"-Wl,--wrap=fmaf",
],
target_compatible_with = select({
"//bazel/constraint:rp2": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
"//src/common/pico_base",
"//src/rp2_common/hardware_divider",
"//src/rp2_common/pico_bootrom",
"//src/rp2_common/pico_platform",
],
alwayslink = True, # Ensures the wrapped symbols are linked in.
)
# TODO: Support float_none.S when the configuration option exists.