From 01c7c21d53bb93b3cae14e0f056425b3381ad1ae Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Sun, 1 Feb 2015 15:28:55 +0900 Subject: tizen 2.3 release --- packaging/baselibs.conf | 157 ++++++++++++--------- packaging/cross-armv5tel-gcc-accel.spec | 127 +++++++++-------- packaging/cross-armv5tel-gcc.spec | 125 ++++++++-------- packaging/cross-armv6l-gcc-accel.spec | 127 +++++++++-------- packaging/cross-armv6l-gcc.spec | 125 ++++++++-------- packaging/cross-armv7hl-gcc-accel.spec | 127 +++++++++-------- packaging/cross-armv7hl-gcc.spec | 125 ++++++++-------- packaging/cross-armv7l-gcc-accel.spec | 127 +++++++++-------- packaging/cross-armv7l-gcc.spec | 125 ++++++++-------- packaging/cross-armv7nhl-gcc-accel.spec | 127 +++++++++-------- packaging/cross-armv7nhl-gcc.spec | 125 ++++++++-------- packaging/gcc.changes | 140 ------------------ packaging/gcc.spec | 125 ++++++++-------- .../gcc_arm_hard_float_dynamic_linker_revert.patch | 30 ++++ packaging/precheckin.sh | 36 +++-- 15 files changed, 891 insertions(+), 857 deletions(-) delete mode 100644 packaging/gcc.changes create mode 100644 packaging/gcc_arm_hard_float_dynamic_linker_revert.patch diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf index 717547351..bd740b178 100644 --- a/packaging/baselibs.conf +++ b/packaging/baselibs.conf @@ -1,6 +1,8 @@ arch i586 targets armv5tel:armv5tel armv6l:armv6l armv7l:armv7l armv7hl:armv7hl armv7nhl:armv7nhl +arch x86_64 targets armv5tel:armv5tel armv6l:armv6l armv7l:armv7l armv7hl:armv7hl armv7nhl:armv7nhl -cross-armv5tel-gcc-accel + +cross-armv5tel-gcc-accel-@X86@ targettype x86 block! targettype 32bit block! targettype armv6l block! @@ -10,11 +12,12 @@ cross-armv5tel-gcc-accel targettype armv5tel autoreqprov off targettype armv5tel provides "cross-arm-gcc-accel" - targettype armv5tel requires "glibc-x86-arm" - targettype armv5tel requires "gmp-x86-arm" - targettype armv5tel requires "libgcc-x86-arm" - targettype armv5tel requires "mpfr-x86-arm" - targettype armv5tel requires "mpc-x86-arm" + targettype armv5tel provides "cross-armv5tel-gcc-accel-armv5tel" + targettype armv5tel requires "eglibc-@X86@-arm" + targettype armv5tel requires "gmp-@X86@-arm" + targettype armv5tel requires "libgcc-@X86@-arm" + targettype armv5tel requires "mpfr-@X86@-arm" + targettype armv5tel requires "mpc-@X86@-arm" targettype armv5tel requires "gcc" targettype armv5tel requires "gcc-c++" @@ -22,6 +25,7 @@ cross-armv5tel-gcc-accel targettype armv5tel extension -arm targettype armv5tel +/ targettype armv5tel -/usr/lib/debug + targettype armv5tel -/usr/lib64/debug targettype armv5tel -/usr/src/debug targettype armv5tel -/usr/share/man targettype armv5tel -/usr/share/doc @@ -33,7 +37,7 @@ cross-armv5tel-gcc-accel targettype armv5tel post " echo \"GCCVER: $GCCVER GCCVER_NEW: $GCCVER_NEW \" " targettype armv5tel post " if test "${GCCVER}" == "${GCCVER_NEW}"; then" targettype armv5tel post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype armv5tel post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype armv5tel post " for bin in c++ cpp g++ gcc gcov; do " targettype armv5tel post " binary="/usr/bin/${bin}" " targettype armv5tel post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv5tel post " echo "${binary} not installed or ${binary}.orig-arm already present !" " @@ -43,16 +47,16 @@ cross-armv5tel-gcc-accel targettype armv5tel post " done " targettype armv5tel post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype armv5tel post " binary="/usr/libexec/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER/$bin" " + targettype armv5tel post " binary="/usr/lib/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER/$bin" " targettype armv5tel post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv5tel post " echo "${binary} not installed or ${binary}.orig-arm already present !" " targettype armv5tel post " else " - targettype armv5tel post " mv ${binary} ${binary}.orig-arm && cp /usr/libexec/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" + targettype armv5tel post " mv ${binary} ${binary}.orig-arm && cp /usr/lib/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" targettype armv5tel post " fi " targettype armv5tel post " done " targettype armv5tel post " else" targettype armv5tel post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype armv5tel post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype armv5tel post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype armv5tel post " binary="/usr/bin/${bin}" " targettype armv5tel post " if test -e ${binary}.orig-arm ; then" targettype armv5tel post " rm ${binary} && mv ${binary}.orig-arm ${binary}" @@ -60,17 +64,18 @@ cross-armv5tel-gcc-accel targettype armv5tel post " echo "${binary}.orig-arm not present !" " targettype armv5tel post " fi " targettype armv5tel post " done " - targettype armv5tel post " rm -f /usr/libexec/gcc/armv5tel-tizen-linux-gnueabi/${GCCVER}/ld" - targettype armv5tel post " rm -f /usr/libexec/gcc/armv5tel-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv5tel post " rm -f /usr/lib/gcc/armv5tel-tizen-linux-gnueabi/${GCCVER}/ld" + targettype armv5tel post " rm -f /usr/lib/gcc/armv5tel-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv5tel post " rm -f /usr/lib/gcc/armv5tel-tizen-linux-gnueabi/${GCCVER}/ld.gold" targettype armv5tel post " fi" targettype armv5tel preun " export GCCVER=$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype armv5tel preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " - targettype armv5tel preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " + targettype armv5tel preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " + targettype armv5tel preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/armv5tel-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " -cross-armv6l-gcc-accel +cross-armv6l-gcc-accel-@X86@ targettype x86 block! targettype 32bit block! targettype armv5tel block! @@ -80,11 +85,12 @@ cross-armv6l-gcc-accel targettype armv6l autoreqprov off targettype armv6l provides "cross-arm-gcc-accel" - targettype armv6l requires "glibc-x86-arm" - targettype armv6l requires "gmp-x86-arm" - targettype armv6l requires "libgcc-x86-arm" - targettype armv6l requires "mpfr-x86-arm" - targettype armv6l requires "mpc-x86-arm" + targettype armv6l provides "cross-armv6l-gcc-accel-armv6l" + targettype armv6l requires "eglibc-@X86@-arm" + targettype armv6l requires "gmp-@X86@-arm" + targettype armv6l requires "libgcc-@X86@-arm" + targettype armv6l requires "mpfr-@X86@-arm" + targettype armv6l requires "mpc-@X86@-arm" targettype armv6l requires "gcc" targettype armv6l requires "gcc-c++" @@ -92,6 +98,7 @@ cross-armv6l-gcc-accel targettype armv6l extension -arm targettype armv6l +/ targettype armv6l -/usr/lib/debug + targettype armv6l -/usr/lib64/debug targettype armv6l -/usr/src/debug targettype armv6l -/usr/share/man targettype armv6l -/usr/share/doc @@ -103,7 +110,7 @@ cross-armv6l-gcc-accel targettype armv6l post " echo \"GCCVER: $GCCVER GCCVER_NEW: $GCCVER_NEW \" " targettype armv6l post " if test "${GCCVER}" == "${GCCVER_NEW}"; then" targettype armv6l post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype armv6l post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype armv6l post " for bin in c++ cpp g++ gcc gcov; do " targettype armv6l post " binary="/usr/bin/${bin}" " targettype armv6l post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv6l post " echo "${binary} not installed or ${binary}.orig-arm already present !" " @@ -113,16 +120,16 @@ cross-armv6l-gcc-accel targettype armv6l post " done " targettype armv6l post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype armv6l post " binary="/usr/libexec/gcc/armv6l-tizen-linux-gnueabi/$GCCVER/$bin" " + targettype armv6l post " binary="/usr/lib/gcc/armv6l-tizen-linux-gnueabi/$GCCVER/$bin" " targettype armv6l post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv6l post " echo "${binary} not installed or ${binary}.orig-arm already present !" " targettype armv6l post " else " - targettype armv6l post " mv ${binary} ${binary}.orig-arm && cp /usr/libexec/gcc/armv6l-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" + targettype armv6l post " mv ${binary} ${binary}.orig-arm && cp /usr/lib/gcc/armv6l-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" targettype armv6l post " fi " targettype armv6l post " done " targettype armv6l post " else" targettype armv6l post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype armv6l post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype armv6l post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype armv6l post " binary="/usr/bin/${bin}" " targettype armv6l post " if test -e ${binary}.orig-arm ; then" targettype armv6l post " rm ${binary} && mv ${binary}.orig-arm ${binary}" @@ -130,17 +137,18 @@ cross-armv6l-gcc-accel targettype armv6l post " echo "${binary}.orig-arm not present !" " targettype armv6l post " fi " targettype armv6l post " done " - targettype armv6l post " rm -f /usr/libexec/gcc/armv6l-tizen-linux-gnueabi/${GCCVER}/ld" - targettype armv6l post " rm -f /usr/libexec/gcc/armv6l-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv6l post " rm -f /usr/lib/gcc/armv6l-tizen-linux-gnueabi/${GCCVER}/ld" + targettype armv6l post " rm -f /usr/lib/gcc/armv6l-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv6l post " rm -f /usr/lib/gcc/armv6l-tizen-linux-gnueabi/${GCCVER}/ld.gold" targettype armv6l post " fi" targettype armv6l preun " export GCCVER=$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype armv6l preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " - targettype armv6l preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/armv6l-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " + targettype armv6l preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " + targettype armv6l preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/armv6l-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " -cross-armv7l-gcc-accel +cross-armv7l-gcc-accel-@X86@ targettype x86 block! targettype 32bit block! targettype armv5tel block! @@ -150,11 +158,12 @@ cross-armv7l-gcc-accel targettype armv7l autoreqprov off targettype armv7l provides "cross-arm-gcc-accel" - targettype armv7l requires "glibc-x86-arm" - targettype armv7l requires "gmp-x86-arm" - targettype armv7l requires "libgcc-x86-arm" - targettype armv7l requires "mpfr-x86-arm" - targettype armv7l requires "mpc-x86-arm" + targettype armv7l provides "cross-armv7l-gcc-accel-armv7l" + targettype armv7l requires "eglibc-@X86@-arm" + targettype armv7l requires "gmp-@X86@-arm" + targettype armv7l requires "libgcc-@X86@-arm" + targettype armv7l requires "mpfr-@X86@-arm" + targettype armv7l requires "mpc-@X86@-arm" targettype armv7l requires "gcc" targettype armv7l requires "gcc-c++" @@ -162,6 +171,7 @@ cross-armv7l-gcc-accel targettype armv7l extension -arm targettype armv7l +/ targettype armv7l -/usr/lib/debug + targettype armv7l -/usr/lib64/debug targettype armv7l -/usr/src/debug targettype armv7l -/usr/share/man targettype armv7l -/usr/share/doc @@ -173,7 +183,7 @@ cross-armv7l-gcc-accel targettype armv7l post " echo \"GCCVER: $GCCVER GCCVER_NEW: $GCCVER_NEW \" " targettype armv7l post " if test "${GCCVER}" == "${GCCVER_NEW}"; then" targettype armv7l post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype armv7l post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype armv7l post " for bin in c++ cpp g++ gcc gcov; do " targettype armv7l post " binary="/usr/bin/${bin}" " targettype armv7l post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7l post " echo "${binary} not installed or ${binary}.orig-arm already present !" " @@ -183,16 +193,16 @@ cross-armv7l-gcc-accel targettype armv7l post " done " targettype armv7l post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype armv7l post " binary="/usr/libexec/gcc/armv7l-tizen-linux-gnueabi/$GCCVER/$bin" " + targettype armv7l post " binary="/usr/lib/gcc/armv7l-tizen-linux-gnueabi/$GCCVER/$bin" " targettype armv7l post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7l post " echo "${binary} not installed or ${binary}.orig-arm already present !" " targettype armv7l post " else " - targettype armv7l post " mv ${binary} ${binary}.orig-arm && cp /usr/libexec/gcc/armv7l-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" + targettype armv7l post " mv ${binary} ${binary}.orig-arm && cp /usr/lib/gcc/armv7l-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" targettype armv7l post " fi " targettype armv7l post " done " targettype armv7l post " else" targettype armv7l post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype armv7l post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype armv7l post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype armv7l post " binary="/usr/bin/${bin}" " targettype armv7l post " if test -e ${binary}.orig-arm ; then" targettype armv7l post " rm ${binary} && mv ${binary}.orig-arm ${binary}" @@ -200,17 +210,18 @@ cross-armv7l-gcc-accel targettype armv7l post " echo "${binary}.orig-arm not present !" " targettype armv7l post " fi " targettype armv7l post " done " - targettype armv7l post " rm -f /usr/libexec/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/ld" - targettype armv7l post " rm -f /usr/libexec/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7l post " rm -f /usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/ld" + targettype armv7l post " rm -f /usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7l post " rm -f /usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/ld.gold" targettype armv7l post " fi" targettype armv7l preun " export GCCVER=$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype armv7l preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " - targettype armv7l preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/armv7l-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " + targettype armv7l preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " + targettype armv7l preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/armv7l-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " -cross-armv7hl-gcc-accel +cross-armv7hl-gcc-accel-@X86@ targettype x86 block! targettype 32bit block! targettype armv5tel block! @@ -220,11 +231,12 @@ cross-armv7hl-gcc-accel targettype armv7hl autoreqprov off targettype armv7hl provides "cross-arm-gcc-accel" - targettype armv7hl requires "glibc-x86-arm" - targettype armv7hl requires "gmp-x86-arm" - targettype armv7hl requires "libgcc-x86-arm" - targettype armv7hl requires "mpfr-x86-arm" - targettype armv7hl requires "mpc-x86-arm" + targettype armv7hl provides "cross-armv7hl-gcc-accel-armv7hl" + targettype armv7hl requires "eglibc-@X86@-arm" + targettype armv7hl requires "gmp-@X86@-arm" + targettype armv7hl requires "libgcc-@X86@-arm" + targettype armv7hl requires "mpfr-@X86@-arm" + targettype armv7hl requires "mpc-@X86@-arm" targettype armv7hl requires "gcc" targettype armv7hl requires "gcc-c++" @@ -232,6 +244,7 @@ cross-armv7hl-gcc-accel targettype armv7hl extension -arm targettype armv7hl +/ targettype armv7hl -/usr/lib/debug + targettype armv7hl -/usr/lib64/debug targettype armv7hl -/usr/src/debug targettype armv7hl -/usr/share/man targettype armv7hl -/usr/share/doc @@ -243,7 +256,7 @@ cross-armv7hl-gcc-accel targettype armv7hl post " echo \"GCCVER: $GCCVER GCCVER_NEW: $GCCVER_NEW \" " targettype armv7hl post " if test "${GCCVER}" == "${GCCVER_NEW}"; then" targettype armv7hl post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype armv7hl post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype armv7hl post " for bin in c++ cpp g++ gcc gcov; do " targettype armv7hl post " binary="/usr/bin/${bin}" " targettype armv7hl post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7hl post " echo "${binary} not installed or ${binary}.orig-arm already present !" " @@ -253,16 +266,16 @@ cross-armv7hl-gcc-accel targettype armv7hl post " done " targettype armv7hl post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype armv7hl post " binary="/usr/libexec/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER/$bin" " + targettype armv7hl post " binary="/usr/lib/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER/$bin" " targettype armv7hl post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7hl post " echo "${binary} not installed or ${binary}.orig-arm already present !" " targettype armv7hl post " else " - targettype armv7hl post " mv ${binary} ${binary}.orig-arm && cp /usr/libexec/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" + targettype armv7hl post " mv ${binary} ${binary}.orig-arm && cp /usr/lib/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" targettype armv7hl post " fi " targettype armv7hl post " done " targettype armv7hl post " else" targettype armv7hl post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype armv7hl post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype armv7hl post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype armv7hl post " binary="/usr/bin/${bin}" " targettype armv7hl post " if test -e ${binary}.orig-arm ; then" targettype armv7hl post " rm ${binary} && mv ${binary}.orig-arm ${binary}" @@ -270,17 +283,18 @@ cross-armv7hl-gcc-accel targettype armv7hl post " echo "${binary}.orig-arm not present !" " targettype armv7hl post " fi " targettype armv7hl post " done " - targettype armv7hl post " rm -f /usr/libexec/gcc/armv7hl-tizen-linux-gnueabi/${GCCVER}/ld" - targettype armv7hl post " rm -f /usr/libexec/gcc/armv7hl-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7hl post " rm -f /usr/lib/gcc/armv7hl-tizen-linux-gnueabi/${GCCVER}/ld" + targettype armv7hl post " rm -f /usr/lib/gcc/armv7hl-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7hl post " rm -f /usr/lib/gcc/armv7hl-tizen-linux-gnueabi/${GCCVER}/ld.gold" targettype armv7hl post " fi" targettype armv7hl preun " export GCCVER=$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype armv7hl preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " - targettype armv7hl preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " + targettype armv7hl preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " + targettype armv7hl preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/armv7hl-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " -cross-armv7nhl-gcc-accel +cross-armv7nhl-gcc-accel-@X86@ targettype x86 block! targettype 32bit block! targettype armv5tel block! @@ -290,11 +304,12 @@ cross-armv7nhl-gcc-accel targettype armv7nhl autoreqprov off targettype armv7nhl provides "cross-arm-gcc-accel" - targettype armv7nhl requires "glibc-x86-arm" - targettype armv7nhl requires "gmp-x86-arm" - targettype armv7nhl requires "libgcc-x86-arm" - targettype armv7nhl requires "mpfr-x86-arm" - targettype armv7nhl requires "mpc-x86-arm" + targettype armv7nhl provides "cross-armv7nhl-gcc-accel-armv7nhl" + targettype armv7nhl requires "eglibc-@X86@-arm" + targettype armv7nhl requires "gmp-@X86@-arm" + targettype armv7nhl requires "libgcc-@X86@-arm" + targettype armv7nhl requires "mpfr-@X86@-arm" + targettype armv7nhl requires "mpc-@X86@-arm" targettype armv7nhl requires "gcc" targettype armv7nhl requires "gcc-c++" @@ -302,6 +317,7 @@ cross-armv7nhl-gcc-accel targettype armv7nhl extension -arm targettype armv7nhl +/ targettype armv7nhl -/usr/lib/debug + targettype armv7nhl -/usr/lib64/debug targettype armv7nhl -/usr/src/debug targettype armv7nhl -/usr/share/man targettype armv7nhl -/usr/share/doc @@ -313,7 +329,7 @@ cross-armv7nhl-gcc-accel targettype armv7nhl post " echo \"GCCVER: $GCCVER GCCVER_NEW: $GCCVER_NEW \" " targettype armv7nhl post " if test "${GCCVER}" == "${GCCVER_NEW}"; then" targettype armv7nhl post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype armv7nhl post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype armv7nhl post " for bin in c++ cpp g++ gcc gcov; do " targettype armv7nhl post " binary="/usr/bin/${bin}" " targettype armv7nhl post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7nhl post " echo "${binary} not installed or ${binary}.orig-arm already present !" " @@ -323,16 +339,16 @@ cross-armv7nhl-gcc-accel targettype armv7nhl post " done " targettype armv7nhl post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype armv7nhl post " binary="/usr/libexec/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER/$bin" " + targettype armv7nhl post " binary="/usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER/$bin" " targettype armv7nhl post " if test -L ${binary} -a -e ${binary}.orig-arm ; then" targettype armv7nhl post " echo "${binary} not installed or ${binary}.orig-arm already present !" " targettype armv7nhl post " else " - targettype armv7nhl post " mv ${binary} ${binary}.orig-arm && cp /usr/libexec/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" + targettype armv7nhl post " mv ${binary} ${binary}.orig-arm && cp /usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER_NEW/${bin} ${binary}" targettype armv7nhl post " fi " targettype armv7nhl post " done " targettype armv7nhl post " else" targettype armv7nhl post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype armv7nhl post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype armv7nhl post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype armv7nhl post " binary="/usr/bin/${bin}" " targettype armv7nhl post " if test -e ${binary}.orig-arm ; then" targettype armv7nhl post " rm ${binary} && mv ${binary}.orig-arm ${binary}" @@ -340,12 +356,13 @@ cross-armv7nhl-gcc-accel targettype armv7nhl post " echo "${binary}.orig-arm not present !" " targettype armv7nhl post " fi " targettype armv7nhl post " done " - targettype armv7nhl post " rm -f /usr/libexec/gcc/armv7nhl-tizen-linux-gnueabi/${GCCVER}/ld" - targettype armv7nhl post " rm -f /usr/libexec/gcc/armv7nhl-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7nhl post " rm -f /usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/${GCCVER}/ld" + targettype armv7nhl post " rm -f /usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/${GCCVER}/ld.bfd" + targettype armv7nhl post " rm -f /usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/${GCCVER}/ld.gold" targettype armv7nhl post " fi" targettype armv7nhl preun " export GCCVER=$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype armv7nhl preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " - targettype armv7nhl preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " + targettype armv7nhl preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/${i}.orig-arm ; then rm /usr/bin/${i} ; mv /usr/bin/${i}.orig-arm /usr/bin/${i}; fi ; done " + targettype armv7nhl preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/armv7nhl-tizen-linux-gnueabi/$GCCVER ; if test -e ${i}.orig-arm ; then rm ${i} ; mv ${i}.orig-arm ${i} ; fi ; done " diff --git a/packaging/cross-armv5tel-gcc-accel.spec b/packaging/cross-armv5tel-gcc-accel.spec index 47ae14f46..1d290e03f 100644 --- a/packaging/cross-armv5tel-gcc-accel.spec +++ b/packaging/cross-armv5tel-gcc-accel.spec @@ -1,5 +1,8 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile -Name: cross-armv5tel-gcc-accel +%ifarch x86_64 +%define x64 x64 +%endif +Name: cross-armv5tel-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv5tel-gcc.spec b/packaging/cross-armv5tel-gcc.spec index de18e648e..3d8944598 100644 --- a/packaging/cross-armv5tel-gcc.spec +++ b/packaging/cross-armv5tel-gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: cross-armv5tel-gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv6l-gcc-accel.spec b/packaging/cross-armv6l-gcc-accel.spec index ac83b87ca..52e28d79a 100644 --- a/packaging/cross-armv6l-gcc-accel.spec +++ b/packaging/cross-armv6l-gcc-accel.spec @@ -1,5 +1,8 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile -Name: cross-armv6l-gcc-accel +%ifarch x86_64 +%define x64 x64 +%endif +Name: cross-armv6l-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv6l-gcc.spec b/packaging/cross-armv6l-gcc.spec index 9b18e0524..3e29e74ff 100644 --- a/packaging/cross-armv6l-gcc.spec +++ b/packaging/cross-armv6l-gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: cross-armv6l-gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7hl-gcc-accel.spec b/packaging/cross-armv7hl-gcc-accel.spec index 6cfb5954c..564aff04c 100644 --- a/packaging/cross-armv7hl-gcc-accel.spec +++ b/packaging/cross-armv7hl-gcc-accel.spec @@ -1,5 +1,8 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile -Name: cross-armv7hl-gcc-accel +%ifarch x86_64 +%define x64 x64 +%endif +Name: cross-armv7hl-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7hl-gcc.spec b/packaging/cross-armv7hl-gcc.spec index f727cb4a8..ecc8c89d6 100644 --- a/packaging/cross-armv7hl-gcc.spec +++ b/packaging/cross-armv7hl-gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: cross-armv7hl-gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7l-gcc-accel.spec b/packaging/cross-armv7l-gcc-accel.spec index 8218b1201..ccfbcc7cc 100644 --- a/packaging/cross-armv7l-gcc-accel.spec +++ b/packaging/cross-armv7l-gcc-accel.spec @@ -1,5 +1,8 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile -Name: cross-armv7l-gcc-accel +%ifarch x86_64 +%define x64 x64 +%endif +Name: cross-armv7l-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7l-gcc.spec b/packaging/cross-armv7l-gcc.spec index 602b4991e..1f5767675 100644 --- a/packaging/cross-armv7l-gcc.spec +++ b/packaging/cross-armv7l-gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: cross-armv7l-gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7nhl-gcc-accel.spec b/packaging/cross-armv7nhl-gcc-accel.spec index 97d922f05..21ed68dcf 100644 --- a/packaging/cross-armv7nhl-gcc-accel.spec +++ b/packaging/cross-armv7nhl-gcc-accel.spec @@ -1,5 +1,8 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile -Name: cross-armv7nhl-gcc-accel +%ifarch x86_64 +%define x64 x64 +%endif +Name: cross-armv7nhl-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/cross-armv7nhl-gcc.spec b/packaging/cross-armv7nhl-gcc.spec index 4956f188c..42f9648a6 100644 --- a/packaging/cross-armv7nhl-gcc.spec +++ b/packaging/cross-armv7nhl-gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: cross-armv7nhl-gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/gcc.changes b/packaging/gcc.changes deleted file mode 100644 index bbded6abe..000000000 --- a/packaging/gcc.changes +++ /dev/null @@ -1,140 +0,0 @@ -* Mon Feb 3 2014 Inkyo Jung -4.6.4 -- Import 4.6.4 (gcc-linaro-4.6-2013.05) from upstream - -* Tue Aug 2 2011 Junfeng Dong -4.5.3 -- Import 4.5.3 from SLP. - -* Sun Apr 24 08:02:35 UTC 2011 - Jan-Simon Möller - 1.0 -- Add baselibs.conf to src.rpm - -* Mon Jan 17 2011 Austin Zhang - 4.5.1 -- Bugfixing: BMC#11667:C++ routine does not compile with arm tool chain - -* Mon Jan 10 2011 Carsten Munk - 4.5.1 -* BMC#12147: Linaro patches fail to build udev - -* Sun Jan 9 2011 Carsten Munk - 4.5.1 -- Untar patch and re-gzip Linaro patch, solves BMC#11498 - -* Tue Jan 4 2011 Carsten Munk - 4.5.1 -- Change from blank macro to %{nil} in crossextraconfig - -* Mon Jan 3 2011 Carsten Munk - 4.5.1 -- Add armv7hl and armv7nhl cross support - -* Fri Dec 31 2010 Carsten Munk - 4.5.1 -- Disable Linaro patchset to allow for bootstrap. - -* Fri Dec 10 2010 Jan-Simon Möller - 4.5.1 - Fri Dec 10 2010 Austin Zhang - 4.5.1 -- Added Linaro patchset based on GCC4.5.1 (BMC#10510) - -* Tue Dec 09 2010 Austin Zhang - 4.5.1 -- Update to 4.5.1 (BMC#FEA10510):Need to update gcc to 4.5.1 with - linaro patchset for hardfp support -- Change format to tar.gz for SDK convenience -- Fix BMC#9053:libssp.so.0 should be in libgcc -- Fix BMC#9601:support for __ARM_PCS predefined symbol in gcc 4.5.x is needed -- Fix BMC#10337,10339:Error when installing gdb with --excludedocs in .ks -- Clean-up obsoleted content - -* Fri Oct 15 11:26:37 UTC 2010 - jsmoeller@linuxfoundation.org - 4.5.1 -- Merged/fixed devel:toolchain with devel:base - -* Tue Oct 14 2010 Austin Zhang - 4.5.0 -- Applied 4.5.0 branch patch for fixing PR#45112 (BMC#8034) - -* Sat Sep 25 2010 Roger Wang - 4.5.0 -- Applied 4.5.0 branch patch for fixing PR#43972 (BMC#7281) - -* Wed Sep 15 2010 Jan-Simon Möller - 4.5.1 -- Harden cross-gcc migration. - -* Tue Aug 31 2010 Austin Zhang - 4.5.1 -- 4.5.1 master - -* Mon Aug 09 2010 Austin Zhang - 4.5.0 -- Changed some files packing to correct sub-packages. -- Added ssp support for ARM port. - -* Mon Aug 09 2010 Jan-Simon Möller - 4.5.0 -- Fix dependency issue gcc vs. cross-gcc - -* Thu Aug 05 2010 Jan-Simon Möller - 4.5.0 -- Fix build on ARM with workaround for ggc+qemu oom issue and -- disable generation of precompiled headers for now on ARM. - Follow-up on BMC#3936. - -* Tue Jul 20 2010 Austin Zhang - 4.5.0 -- Applied ARM hotfix for fixing byteswap issue from REV in ARMv5+ - PR#43698 (BMC#3936) -- Add missing dependency to fix BMC#4046 - -* Tue Jul 08 2010 Austin Zhang - 4.5.0 -- Applied 4.5.0 mainline branch patch for fixing PR#43572(PR#43904) -- Added missing symbolic link - -* Tue Jun 29 2010 Austin Zhang - 4.5.0 -- Fixed packing issue of symbolic link of libgcc_s.so -- Fixed gcc45-use-atom arch string - -* Mon Jun 28 2010 Jan-Simon Möller - 4.5.0 -- Added aaa_README.PACKAGER -- Added precheckin.sh -- Added cross-* conditionals to main gcc.spec -- Added cross-* files -- Added gcc44-ARM-boehm-gc-stack-qemu.patch (make qemu-arm happy) - -* Mon May 24 2010 Austin Zhang - 4.5.0 -- Added rpmlintrc to suppress wanring/error. -- Added multilib support explicitly - -* Mon Apr 19 2010 Austin Zhang - 4.5.0 -- Gcc-4.5.0, the first official version with atom support inside -- Added MPC support -- Enable LTO -- Remove protoize feature -- Removed obsoleted stuffs - -* Thu Mar 25 2010 Anas Nashif - 4.4.2 -- Spec cleanup -- Do not provide .so files - -* Fri Mar 05 2010 Austin Zhang - 4.4.2 -- Enable arm build -- Add MeeGo bugzilla - -* Mon Feb 22 2010 Austin Zhang - 4.4.2 -- Enable ppl/cloog support -- Use release name : MeeGo. - -* Mon Jan 11 2010 Austin Zhang - 4.4.2 -- Use release name : Moblin. - -* Fri Nov 27 2009 Austin Zhang - 4.4.2 -- Updated to 4.4.2. -- Removed obseleted stuffs and non IA related patches. - -* Thu Nov 26 2009 Arjan van de Ven - 4.4.1 -- default to atom tuning - -* Thu Oct 16 2009 Austin Zhang - 4.4.1 -- Add 'provides: gcc-fortran' for compatibility (MB#6798) - -* Thu Sep 16 2009 Austin Zhang - 4.4.1 -- Updated to 20090911 snapshot -- Added patches from fedora: - gcc44-powerpc-libgcc_s_so.patch - gcc44-pr41175* - gcc44-rh5* - gcc44-vta-cfgexpand-ptr-mode-pr41248.patch -- Removed obsoleted patches - -* Thu Aug 26 2009 Austin Zhang - 4.4.1 -- Fix bug 5649 (libstdc++ conflication with 'gcc update') - -* Sat Aug 22 2009 Anas Nashif - 4.4.1 -- Update to 4.4.1 - -* Tue Dec 23 2008 Anas Nashif 4.3 -- Initial import into Moblin diff --git a/packaging/gcc.spec b/packaging/gcc.spec index 3a083bffc..b1f5f7025 100644 --- a/packaging/gcc.spec +++ b/packaging/gcc.spec @@ -1,4 +1,7 @@ # Combined gcc / cross-armv*-gcc(-accel) specfile +%ifarch x86_64 +%define x64 x64 +%endif Name: gcc # crossbuild / accelerator section @@ -58,39 +61,39 @@ BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # Fixme: see above -%if "%{name}" == "cross-armv5tel-gcc-accel" +%if "%{name}" == "cross-armv5tel-gcc-accel-x86" || "%{name}" == "cross-armv5tel-gcc-accel-x64" BuildRequires: cross-armv5tel-eglibc cross-armv5tel-eglibc-devel cross-armv5tel-eglibc-headers BuildRequires: cross-armv5tel-kernel-headers cross-armv5tel-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv6l-gcc-accel" +%if "%{name}" == "cross-armv6l-gcc-accel-x86" || "%{name}" == "cross-armv6l-gcc-accel-x64" BuildRequires: cross-armv6l-eglibc cross-armv6l-eglibc-devel cross-armv6l-eglibc-headers BuildRequires: cross-armv6l-kernel-headers cross-armv6l-binutils %define crossextraconfig %{nil} %endif -%if "%{name}" == "cross-armv7l-gcc-accel" +%if "%{name}" == "cross-armv7l-gcc-accel-x86" || "%{name}" == "cross-armv7l-gcc-accel-x64" BuildRequires: cross-armv7l-eglibc cross-armv7l-eglibc-devel cross-armv7l-eglibc-headers BuildRequires: cross-armv7l-kernel-headers cross-armv7l-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7hl-gcc-accel" +%if "%{name}" == "cross-armv7hl-gcc-accel-x86" || "%{name}" == "cross-armv7hl-gcc-accel-x64" BuildRequires: cross-armv7hl-eglibc cross-armv7hl-eglibc-devel cross-armv7hl-eglibc-headers BuildRequires: cross-armv7hl-kernel-headers cross-armv7hl-binutils %define crossextraconfig --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a %endif -%if "%{name}" == "cross-armv7nhl-gcc-accel" +%if "%{name}" == "cross-armv7nhl-gcc-accel-x86" || "%{name}" == "cross-armv7nhl-gcc-accel-x64" BuildRequires: cross-armv7nhl-eglibc cross-armv7nhl-eglibc-devel cross-armv7nhl-eglibc-headers BuildRequires: cross-armv7nhl-kernel-headers cross-armv7nhl-binutils %define crossextraconfig --with-float=hard --with-fpu=neon --with-arch=armv7-a %endif # single target atm. -ExclusiveArch: %ix86 +ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel -%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)/\\1/")" == "accel" +%if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture -%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel/\\1/") +%define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... @@ -103,7 +106,7 @@ ExclusiveArch: %ix86 %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime -%define newrpath /emul/ia32-linux/lib:/emul/ia32-linux/usr/lib +%define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel @@ -111,8 +114,9 @@ ExclusiveArch: %ix86 # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section -%global gcc_version 4.6 +%global gcc_version 4.6.4 %global gcc_release 2013.05 +%global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 @@ -123,7 +127,7 @@ ExclusiveArch: %ix86 %global build_cloog 1 %endif %endif -%global multilib_64_archs x86_64 +#global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif @@ -131,11 +135,10 @@ ExclusiveArch: %ix86 Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} Release: %{gcc_release} -VCS: toolchains/gcc#submit/master/20131126.022252-0-ga6b8565e99e42d6caee61b5015810d8b78c511bf License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://gcc.gnu.org -Source0: gcc-linaro-%{version}-%{gcc_release}.tar.xz +Source0: gcc-linaro-4.6-%{gcc_release}.tar.xz Source1: libgcc_post_upgrade.c Source100: gcc-rpmlintrc Source200: baselibs.conf @@ -167,6 +170,7 @@ AutoReq: true %endif Patch41: libgcc_post_upgrade.c.arm.patch +Patch1000: gcc_arm_hard_float_dynamic_linker_revert.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} @@ -314,7 +318,8 @@ This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep -%setup -q -n gcc-linaro-%{version}-%{gcc_release} +%setup -q -n gcc-linaro-4.6-%{gcc_release} +%patch1000 -p1 echo '%{version}' >gcc/BASE-VER @@ -365,12 +370,12 @@ export PATH=/opt/cross/bin:$PATH export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler -export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/lib:/emul/ia32-linux/lib:/usr/lib:/lib" +export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ + ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ %ifarch %{arm} --enable-checking=release \ @@ -385,6 +390,7 @@ CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" %else --enable-checking=release \ --enable-multiarch \ + --disable-multilib \ %endif %endif %if %{build_cloog} @@ -445,15 +451,6 @@ cd .. %install rm -fr %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp gcc/COPYING %{buildroot}/usr/share/license/gcc -cp gcc/COPYING %{buildroot}/usr/share/license/cpp -cp gcc/COPYING %{buildroot}/usr/share/license/libgcc -cp gcc/COPYING %{buildroot}/usr/share/license/gcc-c++ -cp gcc/COPYING %{buildroot}/usr/share/license/libstdc++ -cp gcc/COPYING %{buildroot}/usr/share/license/libgomp -cp gcc/COPYING %{buildroot}/usr/share/license/libmudflap - cd obj-%{gcc_target_platform} %if !%{crossbuild} @@ -482,7 +479,7 @@ make DESTDIR=%{buildroot} install # \/\/\/ FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +FULLEPATH=%{buildroot}%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} ln -sf gcc %{buildroot}%{_prefix}/bin/cc mkdir -p %{buildroot}/lib @@ -556,11 +553,11 @@ ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/ -mkdir -p %{buildroot}%{_prefix}/libexec/getconf +mkdir -p %{buildroot}%{_libexecdir}/getconf if gcc/xgcc -B gcc/ -E -dD -xc /dev/null | grep __LONG_MAX__.*2147483647; then - ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_ILP32_OFF32 %{buildroot}%{_libexecdir}/getconf/default else - ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_prefix}/libexec/getconf/default + ln -sf POSIX_V6_LP64_OFF64 %{buildroot}%{_libexecdir}/getconf/default fi @@ -652,8 +649,6 @@ patch %{SOURCE1} < %{PATCH41} gcc -static -Os %{SOURCE1} -o %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade strip %{buildroot}%{_prefix}/sbin/libgcc_post_upgrade -cd .. - # Remove binaries we will not be including, so that they don't end up in # gcc-debuginfo rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a} @@ -684,11 +679,25 @@ rm -f %{buildroot}%{_prefix}/lib/lib*.a rm -rRf %buildroot/%{_prefix}/lib/libiberty.a rm -rRf %buildroot/%{_prefix}/share #set +x +%else +# Fixed x86 dependencies +sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf %endif # /\/\/\ # cross %endif +cd .. + +mkdir -p %{buildroot}%{_datadir}/license +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc +cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ +cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp +cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap + %if !%{crossbuild} # checking and split packaging for native ... # native @@ -750,17 +759,17 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include # Shouldn't include all files under this fold, split to diff pkgs -#%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/* -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* +#%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/* +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto1 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/collect2 +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.* %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include @@ -809,7 +818,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/README +%ifnarch %{arm} +#kernel 3.4 upstream removed a.out.h for arm arch %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include-fixed/linux/a.out.h +%endif # For ARM port %ifarch %{arm} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h @@ -844,10 +856,10 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflap.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmudflapth.so %endif -%dir %{_prefix}/libexec/getconf -%{_prefix}/libexec/getconf/default +%dir %{_libexecdir}/getconf +%{_libexecdir}/getconf/default %doc gcc/README* gcc/COPYING* -/usr/share/license/gcc +%{_datadir}/license/gcc %manifest gcc.manifest %files -n cpp @@ -855,11 +867,11 @@ rm -rf %{buildroot} /lib/cpp %{_prefix}/bin/cpp %{_mandir}/man1/cpp.1* -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 -/usr/share/license/cpp +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1 +%{_datadir}/license/cpp %manifest cpp.manifest %files -n libgcc @@ -869,7 +881,7 @@ rm -rf %{buildroot} /%{_libdir}/libgcc_s.* %{_prefix}/sbin/libgcc_post_upgrade %doc gcc/COPYING.LIB -/usr/share/license/libgcc +%{_datadir}/license/libgcc %manifest libgcc.manifest # For ARM port @@ -888,10 +900,10 @@ rm -rf %{buildroot} %dir %{_prefix}/lib/gcc %dir %{_prefix}/lib/gcc/%{gcc_target_platform} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version} -%dir %{_prefix}/libexec/gcc -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform} -%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version} -%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus +%dir %{_libexecdir}/gcc +%dir %{_libexecdir}/gcc/%{gcc_target_platform} +%dir %{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version} +%{_libexecdir}/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus %ifarch %{multilib_64_archs} %dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32 %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so @@ -902,7 +914,7 @@ rm -rf %{buildroot} %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a %endif -/usr/share/license/gcc-c++ +%{_datadir}/license/gcc-c++ %manifest gcc-c++.manifest %files -n libstdc++ @@ -915,7 +927,7 @@ rm -rf %{buildroot} %{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc*gdb.py* %dir %{_prefix}/share/gcc-%{gcc_version} %{_prefix}/share/gcc-%{gcc_version}/python -/usr/share/license/libstdc++ +%{_datadir}/license/libstdc++ %manifest libstdc++.manifest %files -n libstdc++-devel @@ -937,14 +949,14 @@ rm -rf %{buildroot} %files -n libgomp %defattr(-,root,root,-) %{_prefix}/%{_lib}/libgomp.* -/usr/share/license/libgomp +%{_datadir}/license/libgomp %manifest libgomp.manifest %files -n libmudflap %defattr(-,root,root,-) %{_prefix}/%{_lib}/libmudflap.* %{_prefix}/%{_lib}/libmudflapth.* -/usr/share/license/libmudflap +%{_datadir}/license/libmudflap %manifest libmudflap.manifest %files -n libmudflap-devel @@ -965,7 +977,6 @@ rm -rf %{buildroot} # cross # \/\/\/ %files -/usr/share/license/gcc %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix} diff --git a/packaging/gcc_arm_hard_float_dynamic_linker_revert.patch b/packaging/gcc_arm_hard_float_dynamic_linker_revert.patch new file mode 100644 index 000000000..305811253 --- /dev/null +++ b/packaging/gcc_arm_hard_float_dynamic_linker_revert.patch @@ -0,0 +1,30 @@ +diff -urNp gcc-linaro-4.6-2013.05.orig/gcc/config/arm/linux-eabi.h gcc-linaro-4.6-2013.05/gcc/config/arm/linux-eabi.h +--- gcc-linaro-4.6-2013.05.orig/gcc/config/arm/linux-eabi.h 2014-02-07 19:05:59.000000000 +0900 ++++ gcc-linaro-4.6-2013.05/gcc/config/arm/linux-eabi.h 2014-05-09 20:07:09.042410813 +0900 +@@ -60,23 +60,10 @@ + #undef SUBTARGET_EXTRA_LINK_SPEC + #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION + +-/* GNU/Linux on ARM currently supports three dynamic linkers: +- - ld-linux.so.2 - for the legacy ABI +- - ld-linux.so.3 - for the EABI-derived soft-float ABI +- - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI. +- All the dynamic linkers live in /lib. +- We default to soft-float, but this can be overridden by changing both +- GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ +- ++/* Use ld-linux.so.3 so that it will be possible to run "classic" ++ GNU/Linux binaries on an EABI system. */ + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" +-#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT +- +-#define GLIBC_DYNAMIC_LINKER \ +- "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ +- %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ +- %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" ++#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" + + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ diff --git a/packaging/precheckin.sh b/packaging/precheckin.sh index 7c71ece10..413f78a2f 100644 --- a/packaging/precheckin.sh +++ b/packaging/precheckin.sh @@ -15,16 +15,19 @@ echo -n "arch i586 targets " > baselibs.conf for i in ${ARCHES} ; do # cross spec files cat ./${SPECNAME} | sed -e "s#Name: .*#Name: cross-${i}-${NAME}#" > ./cross-${i}-${NAME}.spec - cat ./${SPECNAME} | sed -e "s#Name: .*#Name: cross-${i}-${NAME}-accel#" > ./cross-${i}-${NAME}-accel.spec + cat ./${SPECNAME} | sed -e "s#Name: .*#Name: cross-${i}-${NAME}-accel-%{!?x64:x86}%{?x64}#" > ./cross-${i}-${NAME}-accel.spec # baselibs.conf - part 2 test ! x"$i" = x"" && echo -n "${i}:${i} " >> baselibs.conf done +echo "" >> baselibs.conf +cat baselibs.conf | sed -e "s/i586/x86_64/" >> baselibs.conf + # baselibs.conf - part 3 echo "" >> baselibs.conf for l in ${ARCHES} ; do echo "" >> baselibs.conf -echo "cross-${l}-${NAME}-accel +echo "cross-${l}-${NAME}-accel-@X86@ targettype x86 block! targettype 32bit block!" >> baselibs.conf for j in ${ARCHES//${l}} ; do @@ -34,11 +37,12 @@ cat >> baselibs.conf << EOF targettype ${l} autoreqprov off targettype ${l} provides "cross-arm-gcc-accel" - targettype ${l} requires "glibc-x86-arm" - targettype ${l} requires "gmp-x86-arm" - targettype ${l} requires "libgcc-x86-arm" - targettype ${l} requires "mpfr-x86-arm" - targettype ${l} requires "mpc-x86-arm" + targettype ${l} provides "cross-${l}-gcc-accel-${l}" + targettype ${l} requires "eglibc-@X86@-arm" + targettype ${l} requires "gmp-@X86@-arm" + targettype ${l} requires "libgcc-@X86@-arm" + targettype ${l} requires "mpfr-@X86@-arm" + targettype ${l} requires "mpc-@X86@-arm" targettype ${l} requires "gcc" targettype ${l} requires "gcc-c++" @@ -46,6 +50,7 @@ cat >> baselibs.conf << EOF targettype ${l} extension -arm targettype ${l} +/ targettype ${l} -/usr/lib/debug + targettype ${l} -/usr/lib64/debug targettype ${l} -/usr/src/debug targettype ${l} -/usr/share/man targettype ${l} -/usr/share/doc @@ -57,7 +62,7 @@ cat >> baselibs.conf << EOF targettype ${l} post " echo \"GCCVER: \$GCCVER GCCVER_NEW: \$GCCVER_NEW \" " targettype ${l} post " if test "\${GCCVER}" == "\${GCCVER_NEW}"; then" targettype ${l} post " echo "GCC and GCC-accel versions match. Enabling cross-compiler." " - targettype ${l} post " for bin in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do " + targettype ${l} post " for bin in c++ cpp g++ gcc gcov; do " targettype ${l} post " binary="/usr/bin/\${bin}" " targettype ${l} post " if test -L \${binary} -a -e \${binary}.orig-arm ; then" targettype ${l} post " echo "\${binary} not installed or \${binary}.orig-arm already present !" " @@ -67,16 +72,16 @@ cat >> baselibs.conf << EOF targettype ${l} post " done " targettype ${l} post " for bin in cc1 cc1plus collect2 lto-wrapper lto1 ; do " - targettype ${l} post " binary="/usr/libexec/gcc/${l}-tizen-linux-gnueabi/\$GCCVER/\$bin" " + targettype ${l} post " binary="/usr/lib/gcc/${l}-tizen-linux-gnueabi/\$GCCVER/\$bin" " targettype ${l} post " if test -L \${binary} -a -e \${binary}.orig-arm ; then" targettype ${l} post " echo "\${binary} not installed or \${binary}.orig-arm already present !" " targettype ${l} post " else " - targettype ${l} post " mv \${binary} \${binary}.orig-arm && cp /usr/libexec/gcc/${l}-tizen-linux-gnueabi/\$GCCVER_NEW/\${bin} \${binary}" + targettype ${l} post " mv \${binary} \${binary}.orig-arm && cp /usr/lib/gcc/${l}-tizen-linux-gnueabi/\$GCCVER_NEW/\${bin} \${binary}" targettype ${l} post " fi " targettype ${l} post " done " targettype ${l} post " else" targettype ${l} post " echo "GCC and GCC-accel versions don't match. Rollback also binutils..." " - targettype ${l} post " for bin in addr2line ar as c++filt gprov ld ld.bfd nm objcopy objdump ranlib readelf size strings strip ; do" + targettype ${l} post " for bin in addr2line ar as c++filt elfedit gprof ld ld.bfd ld.gold nm objcopy objdump ranlib readelf size strings strip ; do" targettype ${l} post " binary="/usr/bin/\${bin}" " targettype ${l} post " if test -e \${binary}.orig-arm ; then" targettype ${l} post " rm \${binary} && mv \${binary}.orig-arm \${binary}" @@ -84,13 +89,14 @@ cat >> baselibs.conf << EOF targettype ${l} post " echo "\${binary}.orig-arm not present !" " targettype ${l} post " fi " targettype ${l} post " done " - targettype ${l} post " rm -f /usr/libexec/gcc/${l}-tizen-linux-gnueabi/\${GCCVER}/ld" - targettype ${l} post " rm -f /usr/libexec/gcc/${l}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd" + targettype ${l} post " rm -f /usr/lib/gcc/${l}-tizen-linux-gnueabi/\${GCCVER}/ld" + targettype ${l} post " rm -f /usr/lib/gcc/${l}-tizen-linux-gnueabi/\${GCCVER}/ld.bfd" + targettype ${l} post " rm -f /usr/lib/gcc/${l}-tizen-linux-gnueabi/\${GCCVER}/ld.gold" targettype ${l} post " fi" targettype ${l} preun " export GCCVER=\$(LANG=C gcc --version | head -1 | cut -d" " -f5) " - targettype ${l} preun " for i in c++ c89 c99 cpp g++ gcc gcov gcc-ar gcc-nm gcc-ranlib; do if test -e /usr/bin/\${i}.orig-arm ; then rm /usr/bin/\${i} ; mv /usr/bin/\${i}.orig-arm /usr/bin/\${i}; fi ; done " - targettype ${l} preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/libexec/gcc/${l}-tizen-linux-gnueabi/\$GCCVER ; if test -e \${i}.orig-arm ; then rm \${i} ; mv \${i}.orig-arm \${i} ; fi ; done " + targettype ${l} preun " for i in c++ cpp g++ gcc gcov; do if test -e /usr/bin/\${i}.orig-arm ; then rm /usr/bin/\${i} ; mv /usr/bin/\${i}.orig-arm /usr/bin/\${i}; fi ; done " + targettype ${l} preun " for i in cc1 cc1plus collect2 lto-wrapper lto1 ; do cd /usr/lib/gcc/${l}-tizen-linux-gnueabi/\$GCCVER ; if test -e \${i}.orig-arm ; then rm \${i} ; mv \${i}.orig-arm \${i} ; fi ; done " EOF -- cgit v1.2.3