bitcoin/depends/hosts/freebsd.mk
fanquake 2d1b1c7dae
build: remove --enable-lto
This has outlived its usefulness, doesn't gel well with
newer compilers & `-flto` related options, i.e thin vs full, or `=auto`,
and having `-flto` as the only option means that sometimes this just
needs to be worked around, i.e in oss-fuzz:
https://github.com/google/oss-fuzz/blob/master/projects/bitcoin-core/build.sh.

While it was convenient when `-flto` was newer, support for `-flto` is now
in all compilers we use, and there's also no-longer any real need
for us to treat `-flto` different to any other optimization option.

Remove it, to remove build complexity, and so there's no need
to port a similar option to CMake.

Note that the LTO option remains in depends, because we still a way to
build packages that have LTO specific patches/options.

If we decide to merge this, I'll follow up downstream in oss-fuzz first,
to make sure we don't break the build.
2024-01-05 15:17:50 +00:00

32 lines
794 B
Makefile

freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
freebsd_release_CFLAGS=-O2
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
freebsd_debug_CFLAGS=-O1
freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)
ifeq (86,$(findstring 86,$(build_arch)))
i686_freebsd_CC=clang -m32
i686_freebsd_CXX=clang++ -m32
i686_freebsd_AR=ar
i686_freebsd_RANLIB=ranlib
i686_freebsd_NM=nm
i686_freebsd_STRIP=strip
x86_64_freebsd_CC=clang -m64
x86_64_freebsd_CXX=clang++ -m64
x86_64_freebsd_AR=ar
x86_64_freebsd_RANLIB=ranlib
x86_64_freebsd_NM=nm
x86_64_freebsd_STRIP=strip
else
i686_freebsd_CC=$(default_host_CC) -m32
i686_freebsd_CXX=$(default_host_CXX) -m32
x86_64_freebsd_CC=$(default_host_CC) -m64
x86_64_freebsd_CXX=$(default_host_CXX) -m64
endif
freebsd_cmake_system=FreeBSD