src/world/gcc/Makefile

35 lines
929 B
Makefile

# Makefile - hhl - /usr/src/world/gcc
# Copyright 2020 Nathan Fisher <nfisher.sr@gmail.com>
#
distname = gcc
patches = gcc-nostdinc.patch
include world.mk
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
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