src/world/gcc/Makefile

56 lines
1.2 KiB
Makefile

# Makefile - hhl - /usr/src/world/gcc
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = gcc
include world.mk
ifeq ($(arch),x86_64)
ifeq ($(build_fortran),1)
fortran = ,fortran
endif
ifeq ($(build_go),1)
go = ,go
endif
endif
ifeq ($(build_d),1)
dlang = ,d
endif
ifeq ($(build_ada),1)
ada = ,ada
endif
ifeq ($(build_objc),1)
objc = ,objc
endif
ifeq ($(build_objcxx),1)
objcxx = ,obj-c++
endif
define pre_configure
[ -d $(srcdir)/gmp ] && rm -rf $(srcdir)/gmp || true
[ -d $(srcdir)/mpc ] && rm -rf $(srcdir)/mpc || true
[ -d $(srcdir)/mpfr ] && rm -rf $(srcdir)/mpfr || true
endef
config_opts += --host=$(tgt)
config_opts += --target=$(tgt)
config_opts += --with-build-sysroot=$(DESTDIR)
config_opts += --with-sysroot=
config_opts += --enable-languages=c,c++$(fortran)$(go)$(dlang)$(ada)$(objc)$(objcxx)
config_opts += --disable-multilib
config_opts += --disable-bootstrap
config_opts += --with-system-zlib
# for musl
#config_opts += --disable-libsanitizer
ifeq ($(arch), armv6)
config_opts += --with-arch=armv6
config_opts += --with-fpu=vfp
config_opts += --with-float=hard
config_opts += --disable-libsanitizer
endif
post_install = ln -sf gcc $(DESTDIR)/usr/bin/cc
include targets.mk