From 5ce2f122de14f5284f6ec5632257b502074642eb Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 17 Aug 2015 06:08:24 -0400 Subject: [PATCH] gcc: Do not remove gcc 'full names' Previously aliases such as arm-linux-androideabi-gcc was removed from the gcc package. This causes trouble and confusion for things that pick up the C compiler they where compiled with (e.g. ruby, go). --- packages/gcc/build.sh | 4 +-- packages/gcc/gcc-Makefile.in.patch | 58 ++++++++++++++++++++++++++++++ packages/gcc/gcc.patch | 47 ------------------------ 3 files changed, 60 insertions(+), 49 deletions(-) create mode 100644 packages/gcc/gcc-Makefile.in.patch diff --git a/packages/gcc/build.sh b/packages/gcc/build.sh index 760a9e3a5..0e8ebe1d0 100755 --- a/packages/gcc/build.sh +++ b/packages/gcc/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://gcc.gnu.org/ TERMUX_PKG_DESCRIPTION="GNU C compiler" TERMUX_PKG_DEPENDS="binutils, libgmp, libmpfr, libmpc, ndk-sysroot" TERMUX_PKG_VERSION=4.9.3 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 TERMUX_PKG_SRCURL=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-${TERMUX_PKG_VERSION}/gcc-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-languages=c,c++ --with-system-zlib --disable-multilib --disable-lto" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-gmp=$TERMUX_PREFIX --with-mpfr=$TERMUX_PREFIX --with-mpc=$TERMUX_PREFIX" @@ -15,7 +15,7 @@ elif [ "$TERMUX_ARCH" = "i686" ]; then TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-arch=i686 --with-tune=atom --with-fpmath=sse" fi TERMUX_PKG_KEEP_STATIC_LIBRARIES="true" -TERMUX_PKG_RM_AFTER_INSTALL="bin/gcc-ar bin/gcc-ranlib bin/c++ bin/gcc-nm bin/*-linux-* lib/gcc/*-linux-*/${TERMUX_PKG_VERSION}/plugin lib/gcc/*-linux-*/${TERMUX_PKG_VERSION}/include-fixed lib/gcc/*-linux-*/$TERMUX_PKG_VERSION/install-tools libexec/gcc/*-linux-*/${TERMUX_PKG_VERSION}/plugin libexec/gcc/*-linux-*/${TERMUX_PKG_VERSION}/install-tools share/man/man7" +TERMUX_PKG_RM_AFTER_INSTALL="bin/gcc-ar bin/gcc-ranlib bin/c++ bin/gcc-nm lib/gcc/*-linux-*/${TERMUX_PKG_VERSION}/plugin lib/gcc/*-linux-*/${TERMUX_PKG_VERSION}/include-fixed lib/gcc/*-linux-*/$TERMUX_PKG_VERSION/install-tools libexec/gcc/*-linux-*/${TERMUX_PKG_VERSION}/plugin libexec/gcc/*-linux-*/${TERMUX_PKG_VERSION}/install-tools share/man/man7" export AR_FOR_TARGET="$AR" export AS_FOR_TARGET="$AS" diff --git a/packages/gcc/gcc-Makefile.in.patch b/packages/gcc/gcc-Makefile.in.patch new file mode 100644 index 000000000..2ef035c5b --- /dev/null +++ b/packages/gcc/gcc-Makefile.in.patch @@ -0,0 +1,58 @@ +The first block is to install aliases such as arm-linux-androideabi-gcc->gcc +as symlinks instead of hard links. + +diff -u -r ../gcc-4.9.3/gcc/Makefile.in ./gcc/Makefile.in +--- ../gcc-4.9.3/gcc/Makefile.in 2014-10-16 09:50:42.000000000 -0400 ++++ ./gcc/Makefile.in 2015-08-16 18:12:44.446098799 -0400 +@@ -260,7 +260,7 @@ + INSTALL = @INSTALL@ + # Some systems may be missing symbolic links, regular links, or both. + # Allow configure to check this and use "ln -s", "ln", or "cp" as appropriate. +-LN=@LN@ ++LN=@LN_S@ + LN_S=@LN_S@ + # These permit overriding just for certain files. + INSTALL_PROGRAM = @INSTALL_PROGRAM@ +@@ -2430,27 +2430,29 @@ + + gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) + gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H) +-CFLAGS-gengtype-lex.o += -DGENERATOR_FILE ++CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE + build/gengtype-lex.o: $(BCONFIG_H) + + gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ + $(SYSTEM_H) + gengtype-parse.o: $(CONFIG_H) +-CFLAGS-gengtype-parse.o += -DGENERATOR_FILE ++CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE + build/gengtype-parse.o: $(BCONFIG_H) + + gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ + gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ + $(XREGEX_H) + gengtype-state.o: $(CONFIG_H) +-CFLAGS-gengtype-state.o += -DGENERATOR_FILE ++CFLAGS-gengtype-state.o += -DGENERATOR_FILE2 ++CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE + build/gengtype-state.o: $(BCONFIG_H) + + gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ + rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ + $(OBSTACK_H) $(XREGEX_H) + gengtype.o: $(CONFIG_H) +-CFLAGS-gengtype.o += -DGENERATOR_FILE ++CFLAGS-gengtype.o += -DGENERATOR_FILE2 ++CFLAGS-build/gengtype.o += -DGENERATOR_FILE + build/gengtype.o: $(BCONFIG_H) + + build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ +@@ -2515,7 +2517,7 @@ + # any system header is included. + gengtype-lex.c : gengtype-lex.l + -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ +- echo '#include "bconfig.h"' > $@.tmp; \ ++ echo '' > $@.tmp; \ + cat $@ >> $@.tmp; \ + mv $@.tmp $@; \ + } diff --git a/packages/gcc/gcc.patch b/packages/gcc/gcc.patch index 6487a5c0d..e597de021 100644 --- a/packages/gcc/gcc.patch +++ b/packages/gcc/gcc.patch @@ -32,53 +32,6 @@ diff -u -r ../gcc-4.8.2/libcpp/macro.c ./libcpp/macro.c if (tb) { char *str = asctime (tb); -Index: gcc-4.8.1/gcc/Makefile.in -=================================================================== ---- ../gcc-4.8.1.orig/gcc/Makefile.in 2013-08-19 11:40:36.844014424 +0000 -+++ ./gcc/Makefile.in 2013-08-19 11:40:37.784014402 +0000 -@@ -3903,27 +3903,29 @@ - - gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H) - gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H) --CFLAGS-gengtype-lex.o += -DGENERATOR_FILE -+CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE - build/gengtype-lex.o: $(BCONFIG_H) - - gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \ - $(SYSTEM_H) - gengtype-parse.o: $(CONFIG_H) --CFLAGS-gengtype-parse.o += -DGENERATOR_FILE -+CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE - build/gengtype-parse.o: $(BCONFIG_H) - - gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \ - gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \ - $(XREGEX_H) - gengtype-state.o: $(CONFIG_H) --CFLAGS-gengtype-state.o += -DGENERATOR_FILE -+CFLAGS-gengtype-state.o += -DGENERATOR_FILE2 -+CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE - build/gengtype-state.o: $(BCONFIG_H) - - gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h \ - rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \ - $(OBSTACK_H) $(XREGEX_H) - gengtype.o: $(CONFIG_H) --CFLAGS-gengtype.o += -DGENERATOR_FILE -+CFLAGS-gengtype.o += -DGENERATOR_FILE2 -+CFLAGS-build/gengtype.o += -DGENERATOR_FILE - build/gengtype.o: $(BCONFIG_H) - - build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h \ -@@ -3988,7 +3990,7 @@ - # any system header is included. - gengtype-lex.c : gengtype-lex.l - -$(FLEX) $(FLEXFLAGS) -o$@ $< && { \ -- echo '#include "bconfig.h"' > $@.tmp; \ -+ echo '' > $@.tmp; \ - cat $@ >> $@.tmp; \ - mv $@.tmp $@; \ - } Index: gcc-4.8.1/gcc/double-int.h =================================================================== --- ../gcc-4.8.1.orig/gcc/double-int.h 2013-01-30 11:04:30.000000000 +0000