Browse Source

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).
android-5
Fredrik Fornwall 9 years ago
parent
commit
5ce2f122de
  1. 4
      packages/gcc/build.sh
  2. 58
      packages/gcc/gcc-Makefile.in.patch
  3. 47
      packages/gcc/gcc.patch

4
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"

58
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 $@; \
}

47
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

Loading…
Cancel
Save