ports

recipes for building multiple softwares
git clone git://z3bra.org/ports
Log | Files | Refs

commit 9cb073ea7049efe58d076ad3991f93be4bbb71df
parent bb3d72eea127b4a87b0c3042d8880b7896f67bf9
Author: z3bra <willyatmailoodotorg>
Date:   Fri Jan  8 19:57:07 2016

Change pcc flags to use the correct lib/include dir

Diffstat:
 pcc/makeme                                    |  6 +++---
 pcc/patches/0001-configure-musl-support.diff  | 28 ++++++++++++++++++++++++++-
 pcc/patches/0001-configure-musl-support.patch | 28 +--------------------------
 pcc/patches/0002-deflibdirs.diff              | 30 ++++++++++++++++++++++++++++-
 4 files changed, 61 insertions(+), 31 deletions(-)

diff --git a/pcc/makeme b/pcc/makeme @@ -6,10 +6,10 @@ package() { curl -# $source | tar xz cd $name-$version - cat ../patches/*.patch | patch -Np1 - ./configure $CONFIGURE_OPT --libexecdir=/libexec/pcc + cat ../patches/*.diff | patch -Np1 + ./configure $CONFIGURE_OPT --libexecdir=/lib/pcc --with-libdir=/lib --with-incdir=/include - make CC="$CC" LDFLAGS="$LDFLAGS" + make CC="$CC" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS -DSTDINC=/include" make DESTDIR=$WORKDIR/$name MANPREFIX=/man install cd .. diff --git a/pcc/patches/0001-configure-musl-support.diff b/pcc/patches/0001-configure-musl-support.diff @@ -0,0 +1,28 @@ +diff -uN a/config.sub b/config.sub +--- a/config.sub 2015-06-18 18:55:00.839543215 +0200 ++++ b/config.sub 2015-06-18 18:59:43.464572172 +0200 +@@ -120,7 +120,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ nto-qnx* | linux-gnu* | linux-musl | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os +@@ -1253,6 +1253,9 @@ + -linux-dietlibc) + os=-linux-dietlibc + ;; ++ -linux-musl) ++ os=-linux-musl ++ ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; +Common subdirectories: a/csu and b/csu +Common subdirectories: a/CVS and b/CVS +Common subdirectories: a/libF77 and b/libF77 +Common subdirectories: a/libI77 and b/libI77 +Common subdirectories: a/libpcc and b/libpcc +Common subdirectories: a/libsoftfloat and b/libsoftfloat diff --git a/pcc/patches/0001-configure-musl-support.patch b/pcc/patches/0001-configure-musl-support.patch @@ -1,28 +0,0 @@ -diff -uN a/config.sub b/config.sub ---- a/config.sub 2015-06-18 18:55:00.839543215 +0200 -+++ b/config.sub 2015-06-18 18:59:43.464572172 +0200 -@@ -120,7 +120,7 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ nto-qnx* | linux-gnu* | linux-musl | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -1253,6 +1253,9 @@ - -linux-dietlibc) - os=-linux-dietlibc - ;; -+ -linux-musl) -+ os=-linux-musl -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -Common subdirectories: a/csu and b/csu -Common subdirectories: a/CVS and b/CVS -Common subdirectories: a/libF77 and b/libF77 -Common subdirectories: a/libI77 and b/libI77 -Common subdirectories: a/libpcc and b/libpcc -Common subdirectories: a/libsoftfloat and b/libsoftfloat diff --git a/pcc/patches/0002-deflibdirs.diff b/pcc/patches/0002-deflibdirs.diff @@ -0,0 +1,30 @@ +diff -urN a/cc/cc/cc.c b/cc/cc/cc.c +--- a/cc/cc/cc.c 2015-08-16 16:00:18.867457413 +0200 ++++ b/cc/cc/cc.c 2015-08-16 16:03:28.963466133 +0200 +@@ -207,9 +207,9 @@ + #endif + #ifndef DEFLIBDIRS /* default library search paths */ + #ifdef MULTIARCH_PATH +-#define DEFLIBDIRS { "/usr/lib/", 0 } ++#define DEFLIBDIRS { LIBDIR, 0 } + #else +-#define DEFLIBDIRS { "/usr/lib/", "/usr/lib/" MULTIARCH_PATH "/", 0 } ++#define DEFLIBDIRS { LIBDIR, LIBDIR MULTIARCH_PATH "/", 0 } + #endif + #endif + #ifndef DEFLIBS /* default libraries included */ +diff -urN a/os/linux/ccconfig.h b/os/linux/ccconfig.h +--- a/os/linux/ccconfig.h 2015-08-16 16:00:18.873457413 +0200 ++++ b/os/linux/ccconfig.h 2015-08-16 16:05:23.446471384 +0200 +@@ -48,9 +48,9 @@ + "-D__amd64", "-D__LP64__", "-D_LP64", NULL, } + #define DYNLINKER { "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", NULL } + #ifndef MULTIARCH_PATH +-#define DEFLIBDIRS { "/usr/lib64/", 0 } ++#define DEFLIBDIRS { LIBDIR, 0 } + #else +-#define DEFLIBDIRS { "/usr/lib64/", "/usr/lib/" MULTIARCH_PATH "/", 0 } ++#define DEFLIBDIRS { LIBDIR, LIBDIR MULTIARCH_PATH "/", 0 } + #endif + #elif defined(mach_mips) + #define CPPMDADD { "-D__mips__", NULL, }