summaryrefslogtreecommitdiff
path: root/package/pcc/patches
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-04-12 08:45:07 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-04-12 08:46:42 +0200
commitd327bc15c7d66bd2b4c435cd7fe28f0bd128ac4b (patch)
tree3a9ede92252ab6fc4722b589acdd971e70fa69f7 /package/pcc/patches
parent990e47b680c06c8a090aa65f18a8bf2b24f857ae (diff)
add pcc compiler
Diffstat (limited to 'package/pcc/patches')
-rw-r--r--package/pcc/patches/100-adk.patch23
-rw-r--r--package/pcc/patches/200-cc_ccom_Makefile_in.patch33
-rw-r--r--package/pcc/patches/999-autoconf.patch38
3 files changed, 94 insertions, 0 deletions
diff --git a/package/pcc/patches/100-adk.patch b/package/pcc/patches/100-adk.patch
new file mode 100644
index 000000000..fe2143dd8
--- /dev/null
+++ b/package/pcc/patches/100-adk.patch
@@ -0,0 +1,23 @@
+Index: os/linux/ccconfig.h
+===================================================================
+RCS file: /cvsroot/pcc/os/linux/ccconfig.h,v
+retrieving revision 1.19
+diff -u -p -r1.19 ccconfig.h
+--- a/os/linux/ccconfig.h 9 Nov 2010 08:40:50 -0000 1.19
++++ b/os/linux/ccconfig.h 2 Apr 2011 14:19:17 -0000
+@@ -67,6 +67,15 @@
+ #error defines for arch missing
+ #endif
+
++#ifdef ADK_FOR_UCLIBC
++#undef DYNLINKER
++#define DYNLINKER { "-dynamic-linker", "/lib/ld-uClibc.so.0", NULL }
++#elif defined(ADK_FOR_GLIBC)
++/* see above */
++#else
++#error What now?
++#endif
++
+ #ifndef LIBDIR
+ #define LIBDIR "/usr/lib/"
+ #endif
diff --git a/package/pcc/patches/200-cc_ccom_Makefile_in.patch b/package/pcc/patches/200-cc_ccom_Makefile_in.patch
new file mode 100644
index 000000000..31e051edd
--- /dev/null
+++ b/package/pcc/patches/200-cc_ccom_Makefile_in.patch
@@ -0,0 +1,33 @@
+$MirOS: ports/lang/pcc/patches/patch-cc_ccom_Makefile_in,v 1.4 2011/04/02 17:45:46 tg Exp $
+
+ • fix missing @CPPFLAGS@
+ • fix cross-compiling
+
+--- a/cc/ccom/Makefile.in.orig Sun Apr 11 15:00:40 2010
++++ b/cc/ccom/Makefile.in Sat Apr 2 17:43:44 2011
+@@ -11,9 +11,14 @@ XFL=-DPCC_DEBUG
+ CC = @CC@
+ EXEEXT = @EXEEXT@
+ CC_FOR_BUILD = @CC_FOR_BUILD@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ -D_ISOC99_SOURCE \
++ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \
++ -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \
++ -I${top_srcdir}/os/${TARGOS}
+ _CFLAGS = @CFLAGS@
+ CFLAGS = $(_CFLAGS) @ADD_CFLAGS@
+-CPPFLAGS = @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \
++CPPFLAGS = @CPPFLAGS@ @ADD_CPPFLAGS@ ${XFL} -Dos_${TARGOS} -Dmach_${TARGMACH} \
+ -D_ISOC99_SOURCE \
+ -I${srcdir} -I${builddir} -I${top_builddir} -I${MIPDIR} -I${MDIR} \
+ -I${top_srcdir}/os/${TARGOS}
+@@ -92,7 +97,8 @@ compat.o: $(MIPDIR)/compat.c external.h
+ $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(MIPDIR)/compat.c
+
+ external.h external.c: ${MIPDIR}/mkext.c $(MDIR)/table.c
+- $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS) $(CFLAGS) -DMKEXT -o mkext \
++ $(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) \
++ -DMKEXT -o mkext \
+ ${MIPDIR}/mkext.c $(MDIR)/table.c ${MIPDIR}/common.c
+ ./mkext
+
diff --git a/package/pcc/patches/999-autoconf.patch b/package/pcc/patches/999-autoconf.patch
new file mode 100644
index 000000000..531b5291b
--- /dev/null
+++ b/package/pcc/patches/999-autoconf.patch
@@ -0,0 +1,38 @@
+--- a/configure Fri Apr 1 13:58:07 2011
++++ b/configure Sat Apr 2 19:21:15 2011
+@@ -672,6 +672,8 @@ ac_ct_CC
+ EXEEXT
+ OBJEXT
+ CC_FOR_BUILD
++CPPFLAGS_FOR_BUILD
++CFLAGS_FOR_BUILD
+ CPP
+ GREP
+ EGREP
+@@ -3292,6 +3294,8 @@ else
+ echo "${ECHO_T}not cross compiling" >&6; }
+ CC_FOR_BUILD=${CC-cc}
+
++ test -n "$CPPFLAGS_FOR_BUILD" || CPPFLAGS_FOR_BUILD=$CPPFLAGS
++ test -n "$CFLAGS_FOR_BUILD" || CFLAGS_FOR_BUILD=$CFLAGS
+ fi
+
+
+@@ -5765,6 +5769,8 @@ ac_ct_CC!$ac_ct_CC$ac_delim
+ EXEEXT!$EXEEXT$ac_delim
+ OBJEXT!$OBJEXT$ac_delim
+ CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
++CPPFLAGS_FOR_BUILD!$CPPFLAGS_FOR_BUILD$ac_delim
++CFLAGS_FOR_BUILD!$CFLAGS_FOR_BUILD$ac_delim
+ CPP!$CPP$ac_delim
+ GREP!$GREP$ac_delim
+ EGREP!$EGREP$ac_delim
+@@ -5787,7 +5793,7 @@ LIBOBJS!$LIBOBJS$ac_delim
+ LTLIBOBJS!$LTLIBOBJS$ac_delim
+ _ACEOF
+
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5