# HG changeset patch # User Michael Schloh von Bennewitz # Date 1344082574 -7200 # Node ID 0746a003fc03c54f16b4b76dea473e6d740e7357 # Parent 8fac5290decb113a435d1e41fecc514c1bcb4f9f All other packages force 32-bit building and produce binaries so accommodate OpenPKG 32-bit least common denominator policy by neutralizing changes made in commit 434. diff -r 8fac5290decb -r 0746a003fc03 openpkg/openpkg.spec --- a/openpkg/openpkg.spec Fri Aug 03 20:12:19 2012 +0200 +++ b/openpkg/openpkg.spec Sat Aug 04 14:16:14 2012 +0200 @@ -823,14 +823,6 @@ cd openpkg-%{version} . ./.buildenv - # force usage of proper architecture parameter - bitopt= - case `sh $shtool platform -n -L -S "" -C "+" -F "%-%"` in - amd64-* ) bitopt=-m64 ;; - ia64-* ) bitopt=-m64 ;; - sparc64-* ) bitopt=-m64 ;; - esac - # display verbosity header set +x; VERBOSE "BUILD: Build GNU bash (Bourne-again Shell)"; set -x @@ -856,10 +848,8 @@ export AUTOCONF CC="${l_cc}" export CC - CCFLAGS_FOR_BUILD="$bitopt -O" \ - export CCFLAGS_FOR_BUILD case "$plid" in - Darwin/* ) LDFLAGS="$bitopt -Wl,-search_paths_first" ;; + Darwin/* ) LDFLAGS="-Wl,-search_paths_first" ;; esac ./configure \ --cache-file=./config.cache \ @@ -876,7 +866,7 @@ # build BZIP2 library ( cd bzip2-%{V_bzip2} - ${l_make} CC="${l_cc}" CFLAGS="$bitopt -O" libbz2.a bzip2 || exit $? + ${l_make} CC="${l_cc}" CFLAGS="-O" libbz2.a bzip2 || exit $? ( echo "# libbz2.la - a libtool library file" echo "# Generated by ltmain.sh - GNU libtool x.x.x" echo "dlname=''" @@ -899,7 +889,7 @@ # build ZLIB library ( cd zlib-%{V_zlib} - CC="${l_cc}" CFLAGS="$bitopt -O" ./configure + CC="${l_cc}" CFLAGS="-O" ./configure ${l_make} CC="${l_cc}" libz.a || exit $? # intentionally do not pass CFLAGS here ) || exit $? @@ -913,7 +903,7 @@ Darwin/* ) opts="--disable-assembler" ;; esac CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ ./configure \ --prefix=%{l_prefix} \ --libdir="%{l_prefix}/lib" \ @@ -932,8 +922,7 @@ # build OSSP uuid tool ( cd uuid-%{V_uuid} CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ - LDFLAGS="$bitopt" \ + CFLAGS="-O" \ GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ @@ -992,6 +981,8 @@ # build OpenSSL toolkit ( cd openssl-%{V_openssl} sh $shtool subst \ + -e 's;-m64 *;;g' \ + -e 's;-xarch=amd64 *;;g' \ -e 's;-m486;-march=i486;g' \ -e 's;BN_LLONG *;;' \ Configure @@ -1001,9 +992,6 @@ sh $shtool subst \ -e "1s;^.*\$;#!$l_perl;" \ Configure `find . -name "*.pl" -print` - sh $shtool subst \ - -e 's;xarch=amd64;m64;g' \ - Configure opts="" case `sh $shtool platform -n -L -S "" -C "+" -F "%-%"` in *-solaris* ) opts="-lnsl -lsocket" ;; @@ -1030,9 +1018,9 @@ -e 's;\(AM_CFLAGS =\) -Wall;\1;' \ Makefile.in CC="${l_cc}" \ - CFLAGS="$bitopt -O -D_POSIX_PTHREAD_SEMANTICS" \ + CFLAGS="-O -D_POSIX_PTHREAD_SEMANTICS" \ CPPFLAGS="-I`pwd`/../zlib-%{V_zlib} -I`pwd`/../bzip2-%{V_bzip2} -I`pwd`/../xz-%{V_xz}/src/liblzma/api -I`pwd`/../openssl-%{V_openssl}/include" \ - LDFLAGS="$bitopt -L`pwd`/../zlib-%{V_zlib} -L`pwd`/../bzip2-%{V_bzip2} -L`pwd`/../xz-%{V_xz}/src/liblzma/.libs -L`pwd`/../openssl-%{V_openssl}" \ + LDFLAGS="-L`pwd`/../zlib-%{V_zlib} -L`pwd`/../bzip2-%{V_bzip2} -L`pwd`/../xz-%{V_xz}/src/liblzma/.libs -L`pwd`/../openssl-%{V_openssl}" \ GREP="grep" \ ./configure \ --prefix=%{l_prefix} \ @@ -1055,7 +1043,7 @@ # build GNU diffutils ( cd diffutils-%{V_diffutils} CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ ./configure \ --prefix=%{l_prefix} \ --disable-nls @@ -1076,9 +1064,9 @@ echo 'lt_cv_sys_max_cmd_len=100' ) >config.cache CC="${l_cc}" \ - CFLAGS="$bitopt -I`pwd`/../zlib-%{V_zlib}" \ + CFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ CPPFLAGS="-I`pwd`/../zlib-%{V_zlib}" \ - LDFLAGS="$bitopt -L`pwd`/../zlib-%{V_zlib}" \ + LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ GREP="grep" \ ./configure \ --cache-file=./config.cache \ @@ -1098,7 +1086,7 @@ # build PCRE library ( cd pcre-%{V_pcre} CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ GREP="grep" \ ./configure \ --disable-cpp \ @@ -1128,7 +1116,7 @@ echo 'bc_cv_as_noexecstack=no' ) >config.cache CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ @@ -1153,7 +1141,7 @@ # build POPT library ( cd popt-%{V_popt} CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ CPPFLAGS="-DOPENPKG -DPOPT_fprintf=fprintf" \ GREP="grep" \ ./configure \ @@ -1173,7 +1161,7 @@ # build SQLite library ( cd sqlite-%{V_sqlite} CC="${l_cc}" \ - CFLAGS="$bitopt -O" \ + CFLAGS="-O" \ LIBS="-lm" \ GREP="grep" \ ./configure \ @@ -1229,9 +1217,9 @@ # set build tool flags CC="${l_cc}" - CFLAGS="$bitopt" + CFLAGS="" CPPFLAGS="-DRPM_VENDOR_OPENPKG" - LDFLAGS="$bitopt" + LDFLAGS="" LIBS="" LIBS="$LIBS -lm" export CC @@ -1348,7 +1336,7 @@ ${l_make} -f `SOURCE mutex.mk` \ CC="${l_cc}" \ CPPFLAGS="-Ipopt-%{V_popt}" \ - LDFLAGS="$bitopt -Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ + LDFLAGS="-Lpopt-%{V_popt} -Lpopt-%{V_popt}/.libs" \ MUTEX_DOT_C="`SOURCE mutex.c`" %install diff -r 8fac5290decb -r 0746a003fc03 openpkg/openssl.patch --- a/openpkg/openssl.patch Fri Aug 03 20:12:19 2012 +0200 +++ b/openpkg/openssl.patch Sat Aug 04 14:16:14 2012 +0200 @@ -75,8 +75,15 @@ *) echo "i686-apple-darwin${VERSION}" ;; -@@ -413,7 +416,7 @@ +@@ -411,9 +414,14 @@ + # this is where the translation occurs into SSLeay terms + # --------------------------------------------------------------------------- ++# Assume CC is GNU GCC if 'dumpversion' argument produces valid output ++GCCVER=`sh -c "${CC-gcc} -dumpversion" 2>/dev/null` ++GCCVER=`echo $GCCVER | LC_ALL=C sed 's/^[a-zA-Z]*\-//'` ++GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` ++ # Only set CC if not supplied already if [ -z "$CROSS_COMPILE$CC" ]; then - GCCVER=`sh -c "gcc -dumpversion" 2>/dev/null` @@ -84,25 +91,25 @@ if [ "$GCCVER" != "" ]; then # then strip off whatever prefix egcs prepends the number with... # Hopefully, this will work for any future prefixes as well. -@@ -424,8 +427,17 @@ +@@ -424,8 +432,17 @@ # peak single digit before and after first dot, e.g. 2.95.1 gives 29 GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'` CC=gcc + SUFFIX=gcc -+ else -+ CC=cc + else + CC=cc + SUFFIX=cc + fi +else + if [ "$GCCVER" != "" ]; then + SUFFIX=gcc - else - CC=cc ++ else ++ CC=cc + SUFFIX=cc fi fi GCCVER=${GCCVER:-0} -@@ -435,7 +447,7 @@ +@@ -435,7 +452,7 @@ if [ $GCCVER -ge 30 ]; then # PA64 support only came in with gcc 3.0.x. # We check if the preprocessor symbol __LP64__ is defined... @@ -111,7 +118,7 @@ : # __LP64__ has slipped through, it therefore is not defined else GCC_BITS="64" -@@ -446,13 +458,14 @@ +@@ -446,13 +463,14 @@ if [ $GCCVER -ge 30 ]; then # 64-bit ABI isn't officially supported in gcc 3.0, but it appears # to be working, at the very least 'make test' passes... @@ -127,7 +134,7 @@ CCVER=`(cc -V 2>&1) 2>/dev/null | \ egrep -e '^cc: .* C [0-9]\.[0-9]' | \ sed 's/.* C \([0-9]\)\.\([0-9]\).*/\1\2/'` -@@ -465,6 +478,7 @@ +@@ -465,6 +483,7 @@ sleep 5 fi fi @@ -135,7 +142,7 @@ fi if [ "${SYSTEM}-${MACHINE}" = "Linux-alpha" ]; then -@@ -482,6 +496,7 @@ +@@ -482,6 +501,7 @@ if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc @@ -143,7 +150,7 @@ fi CCVER=${CCVER:-0} -@@ -507,7 +522,7 @@ +@@ -507,7 +527,7 @@ if [ $CPU -ge 4000 ]; then options="$options -mips2" fi @@ -152,7 +159,7 @@ ;; mips3-sgi-irix) #CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` -@@ -517,11 +532,11 @@ +@@ -517,11 +537,11 @@ #else # options="$options -mips3" #fi @@ -166,7 +173,7 @@ if [ "$TEST" = "false" -a -t 1 ]; then echo " You have about 5 seconds to press Ctrl-C to abort." (trap "stty `stty -g`" 2 0; stty -icanon min 0 time 50; read waste) <&1 -@@ -533,7 +548,7 @@ +@@ -533,7 +553,7 @@ #else # options="$options -mips3" #fi @@ -175,7 +182,7 @@ ;; ppc-apple-rhapsody) OUT="rhapsody-ppc-cc" ;; ppc-apple-darwin*) -@@ -566,6 +581,9 @@ +@@ -566,6 +586,9 @@ else OUT="darwin-i386-cc" fi ;; @@ -185,7 +192,7 @@ armv6+7-*-iphoneos) options="$options -arch%20armv6 -arch%20armv7" OUT="iphoneos-cross" ;; -@@ -575,10 +593,10 @@ +@@ -575,10 +598,10 @@ alpha-*-linux2) ISA=`awk '/cpu model/{print$4;exit(0);}' /proc/cpuinfo` case ${ISA:-generic} in @@ -199,7 +206,7 @@ case ${ISA:-generic} in EV5|EV45) options="$options -mcpu=ev5";; EV56|PCA56) options="$options -mcpu=ev56";; -@@ -662,7 +680,7 @@ +@@ -662,7 +685,7 @@ ;; x86_64-*-linux?) OUT="linux-x86_64" ;; *86-*-linux2) OUT="linux-elf" @@ -208,7 +215,7 @@ if grep '^model.*Pentium' /proc/cpuinfo >/dev/null ; then options="$options -march=pentium" fi -@@ -676,17 +694,17 @@ +@@ -676,17 +699,17 @@ *-*-linux1) OUT="linux-aout" ;; *-*-linux2) OUT="linux-generic32" ;; sun4[uv]*-*-solaris2) @@ -229,7 +236,7 @@ # $GCC_ARCH denotes default ABI chosen by compiler driver # (first one found on the $PATH). I assume that user # expects certain consistency with the rest of his builds -@@ -712,21 +730,21 @@ +@@ -712,21 +735,21 @@ OUT="solaris64-sparcv9-$CC" fi ;; @@ -257,7 +264,7 @@ *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; alpha*-*-*bsd*) OUT="BSD-generic64"; options="$options -DL_ENDIAN" ;; -@@ -750,7 +768,7 @@ +@@ -750,7 +773,7 @@ *-*-osf) OUT="osf1-alpha-cc" ;; *-*-tru64) OUT="tru64-alpha-cc" ;; *-*-[Uu]nix[Ww]are7) @@ -266,7 +273,7 @@ OUT="unixware-7-gcc" ; options="$options no-sse2" else OUT="unixware-7" ; options="$options no-sse2 -D__i386__" -@@ -761,12 +779,12 @@ +@@ -761,12 +784,12 @@ *-*-vos) options="$options no-threads no-shared no-asm no-dso" EXE=".pm" @@ -281,7 +288,7 @@ OUT="hpux64-parisc2-gcc" fi [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITS) 2>/dev/null` -@@ -781,8 +799,8 @@ +@@ -781,8 +804,8 @@ OUT="hpux-ia64-cc" fi elif [ $CPU_VERSION -ge 532 ]; then # PA-RISC 2.x CPU @@ -292,7 +299,7 @@ echo "WARNING! If you wish to build 64-bit library then you have to" echo " invoke './Configure hpux64-parisc2-cc' *manually*." if [ "$TEST" = "false" -a -t 1 ]; then -@@ -791,9 +809,9 @@ +@@ -791,9 +814,9 @@ fi fi elif [ $CPU_VERSION -ge 528 ]; then # PA-RISC 1.1+ CPU @@ -304,7 +311,7 @@ else # Motorola(?) CPU OUT="hpux-$CC" fi -@@ -803,7 +821,7 @@ +@@ -803,7 +826,7 @@ [ "$KERNEL_BITS" ] || KERNEL_BITS=`(getconf KERNEL_BITMODE) 2>/dev/null` KERNEL_BITS=${KERNEL_BITS:-32} OBJECT_MODE=${OBJECT_MODE:-32} @@ -313,7 +320,7 @@ OUT="aix-gcc" if [ $OBJECT_MODE -eq 64 ]; then echo 'Your $OBJECT_MODE was found to be set to 64' -@@ -913,7 +931,7 @@ +@@ -913,7 +936,7 @@ #fi if [ -z "$OUT" ]; then @@ -322,7 +329,7 @@ fi if [ ".$PERL" = . ] ; then -@@ -945,9 +963,9 @@ +@@ -945,9 +968,9 @@ # compiler for the platform ... in which case we add it on # the end ... otherwise we leave it off @@ -334,7 +341,7 @@ fi OUT="$PREFIX$OUT" -@@ -957,9 +975,9 @@ +@@ -957,9 +980,9 @@ echo Configuring for $OUT if [ "$TEST" = "true" ]; then