summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2010-08-16 20:05:35 +0000
committerHarald van Dijk <truedfx@gentoo.org>2010-08-16 20:05:35 +0000
commitbe31e674febaca0cc204d7e5cc011bc25ed4a503 (patch)
tree0d6d4396a3c5d6263c7d0549013f2c847b201931 /dev-lang/tcc
parentEAPI=2; make it easier to find for reversi fans (bug #332807) (diff)
downloadgentoo-2-be31e674febaca0cc204d7e5cc011bc25ed4a503.tar.gz
gentoo-2-be31e674febaca0cc204d7e5cc011bc25ed4a503.tar.bz2
gentoo-2-be31e674febaca0cc204d7e5cc011bc25ed4a503.zip
Respect CFLAGS, LDFLAGS (#332599)
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/tcc')
-rw-r--r--dev-lang/tcc/ChangeLog6
-rw-r--r--dev-lang/tcc/files/tcc-0.9.25-flags.patch83
-rw-r--r--dev-lang/tcc/tcc-0.9.25.ebuild10
3 files changed, 92 insertions, 7 deletions
diff --git a/dev-lang/tcc/ChangeLog b/dev-lang/tcc/ChangeLog
index 933a1a59da25..b73d66f7fa44 100644
--- a/dev-lang/tcc/ChangeLog
+++ b/dev-lang/tcc/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-lang/tcc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.30 2010/07/08 16:29:57 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.31 2010/08/16 20:05:34 truedfx Exp $
+
+ 16 Aug 2010; Harald van Dijk <truedfx@gentoo.org> tcc-0.9.25.ebuild,
+ +files/tcc-0.9.25-flags.patch:
+ Respect CFLAGS, LDFLAGS (#332599)
08 Jul 2010; Markos Chandras <hwoarang@gentoo.org> tcc-0.9.25.ebuild:
Make it respect CC variable wrt bug #243892
diff --git a/dev-lang/tcc/files/tcc-0.9.25-flags.patch b/dev-lang/tcc/files/tcc-0.9.25-flags.patch
new file mode 100644
index 000000000000..42ac9f3bfbfa
--- /dev/null
+++ b/dev-lang/tcc/files/tcc-0.9.25-flags.patch
@@ -0,0 +1,83 @@
+diff --git a/Makefile b/Makefile
+index 1a2b5f7..30526b2 100644
+--- a/Makefile
++++ b/Makefile
+@@ -115,32 +115,32 @@ all: $(PROGS) $(LIBTCC1) $(BCHECK_O) libtcc.a tcc-doc.html tcc.1 libtcc_test$(EX
+
+ # Host Tiny C Compiler
+ tcc$(EXESUF): $(NATIVE_FILES)
+- $(CC) -o $@ $< $(NATIVE_TARGET) $(CFLAGS) $(LIBS)
++ $(CC) -o $@ $(NATIVE_TARGET) $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ # Cross Tiny C Compilers
+ i386-tcc$(EXESUF): $(I386_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_I386 $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_I386 $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ i386-win32-tcc$(EXESUF): $(WIN32_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_PE $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_PE $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ x86_64-tcc$(EXESUF): $(X86_64_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_X86_64 $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_X86_64 $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ c67-tcc$(EXESUF): $(C67_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_C67 $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_C67 $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ arm-tcc-fpa$(EXESUF): $(ARM_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_ARM $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_ARM $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ arm-tcc-fpa-ld$(EXESUF): $(ARM_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_ARM -DLDOUBLE_SIZE=12 $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_ARM -DLDOUBLE_SIZE=12 $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ arm-tcc-vfp$(EXESUF): $(ARM_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_ARM -DTCC_ARM_VFP $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_ARM -DTCC_ARM_VFP $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ arm-tcc-vfp-eabi$(EXESUF): $(ARM_FILES)
+- $(CC) -o $@ $< -DTCC_TARGET_ARM -DTCC_ARM_EABI $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -DTCC_TARGET_ARM -DTCC_ARM_EABI $(CFLAGS) $(LDFLAGS) $< $(LIBS)
+
+ # libtcc generation and test
+ libtcc.o: $(NATIVE_FILES)
+@@ -150,14 +150,14 @@ libtcc.a: libtcc.o
+ $(AR) rcs $@ $^
+
+ libtcc_test$(EXESUF): tests/libtcc_test.c libtcc.a
+- $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS)
++ $(CC) -o $@ -I. $(CFLAGS) $(LDFLAGS) $^ $(LIBS)
+
+ libtest: libtcc_test$(EXESUF) $(LIBTCC1)
+ ./libtcc_test$(EXESUF) lib_path=.
+
+ # profiling version
+ tcc_p$(EXESUF): $(NATIVE_FILES)
+- $(CC) -o $@ $< $(NATIVE_TARGET) $(CFLAGS_P) $(LIBS_P)
++ $(CC) -o $@ $(NATIVE_TARGET) $(CFLAGS_P) $(LDFLAGS) $< $(LIBS_P)
+
+ # windows utilities
+ tiny_impdef$(EXESUF): win32/tools/tiny_impdef.c
+@@ -180,16 +180,16 @@ LIBTCC1_OBJS+=alloca86.o alloca86-bt.o
+ endif
+
+ %.o: %.c
+- $(LIBTCC1_CC) -o $@ -c $< -O2 -Wall
++ $(LIBTCC1_CC) $(CFLAGS) -c $< -o $@
+
+ %.o: %.S
+- $(LIBTCC1_CC) -o $@ -c $<
++ $(LIBTCC1_CC) $(ASFLAGS) -c $< -o $@
+
+ libtcc1.a: $(LIBTCC1_OBJS)
+ $(AR) rcs $@ $^
+
+ bcheck.o: bcheck.c
+- $(CC) -o $@ -c $< -O2 -Wall
++ $(CC) $(CFLAGS) -c $< -o $@
+
+ # install
+ TCC_INCLUDES = stdarg.h stddef.h stdbool.h float.h varargs.h tcclib.h
diff --git a/dev-lang/tcc/tcc-0.9.25.ebuild b/dev-lang/tcc/tcc-0.9.25.ebuild
index 8c245b663a89..64abe0442ddc 100644
--- a/dev-lang/tcc/tcc-0.9.25.ebuild
+++ b/dev-lang/tcc/tcc-0.9.25.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-0.9.25.ebuild,v 1.2 2010/07/08 16:29:57 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-0.9.25.ebuild,v 1.3 2010/08/16 20:05:34 truedfx Exp $
inherit eutils toolchain-funcs
@@ -24,9 +24,7 @@ RESTRICT="test"
src_unpack() {
unpack ${A}
cd "${S}"
- #epatch "${FILESDIR}"/${PN}-0.9.23-anonunion.patch
- #epatch "${FILESDIR}"/${PN}-0.9.23-asneeded.patch
- #epatch "${FILESDIR}"/${PN}-0.9.23-nxbit.patch
+ epatch "${FILESDIR}"/${PN}-0.9.25-flags.patch
# Don't strip
sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile
@@ -43,8 +41,8 @@ src_compile() {
local myopts
use x86 && myopts="--cpu=x86"
use amd64 && myopts="--cpu=x86-64"
- econf ${myopts}
- emake CC="$(tc-getCC)" || die "make failed"
+ econf ${myopts} --cc="$(tc-getCC)"
+ emake || die "make failed"
}
src_install() {