diff --git a/CrossCompile.sh b/CrossCompile.sh new file mode 100755 index 0000000..a2feabc --- /dev/null +++ b/CrossCompile.sh @@ -0,0 +1,41 @@ +#! /bin/bash +# +# + +WRKDIR=`pwd` +CMDDIR=`dirname $0` +cd $CMDDIR + +TOOLCHAIN=`grep BR2_HOST_DIR .config | awk -F\= -F\" '{print $2}'` +echo $TOOLCHAIN + +if [[ $TOOLCHAIN = *\$\(BASE_DIR\)* ]]; then + export SYSROOT=`readlink -f $CMDDIR`/output/host/usr/bin/ +else + export SYSROOT=$TOOLCHAIN/usr/bin +fi + +export PATH=$PATH:$SYSROOT + +export CROSS_COMPILE=arm-buildroot-linux-gnueabihf- +export ARCH=arm +export KERNELDIR=`pwd`/output/build/linux-7f280334068b7c875ade51f8f3921ab311f0c824 +export BB_KERNEL_SOURCES=$KERNELDIR +export SYSROOTARM=`grep BR2_HOST_DIR .config | awk -F\= -F\" '{print $2}'`/usr/arm-buildroot-linux-gnueabihf/sysroot +export CC_FULLPATH="${SYSROOT}${CROSS_COMPILE}" +#--- gnupru +export PASM=pasm +##export PSYSROOT=/home/ru/pru/pru-gcc/bin +export PSYSROOT=/opt/GfA/PRU-ICSS/bin/pru-gcc/bin +export PATH=$PSYSROOT:$PATH + +export PCROSS_COMPILE=pru- +export PARCH=pru + +cd $WRKDIR +if [ $# -eq "0" ] +then +PROMPT_COMMAND='PS1="\[\033[0;31m\]CROSS CC:\[\033[0;32m\]$PS1";unset PROMPT_COMMAND' bash ; reset +else +$1 +fi diff --git a/MakeIMAGE.sh b/MakeIMAGE.sh new file mode 100755 index 0000000..02271d3 --- /dev/null +++ b/MakeIMAGE.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +SAVE_LC=$LC_ALL +export LC_ALL=C + +BUILD=`cat ../GfA/board/GfA/Display001/BUILD` +IMAGEFILE=../Display001_Build_$BUILD-img + +echo "Image: $IMAGEFILE" +#-- build imagefile +dd if=/dev/zero ibs=1M count=1 > $IMAGEFILE +dd if=/dev/zero ibs=1M count=2048 | tr "\000" "\377" >> $IMAGEFILE +apt-get install codelite wxcrafter +#-- create partitions BOOT rootfs !!! don't change !!!! +fdisk $IMAGEFILE << EOF +o +n +p + + ++300M +n +p + + + +t +1 +c +a +1 +p +w +EOF +echo "=============" +#-- map partitions +DRIVE1=/dev/mapper/`kpartx -s -l $IMAGEFILE | head -n 1 | awk '{print $1}'` +DRIVE2=/dev/mapper/`kpartx -s -l $IMAGEFILE | head -n 2 | tail -n 1 | awk '{print $1}'` + +echo ">>>>>>>>>>>>>>>>>>" +echo $DRIVE1 +echo $DRIVE2 +echo ">>>>>>>>>>>>>>>>>>" + +kpartx -asv $IMAGEFILE +#-- mount partitions +umount /tmp/boot +umount /tmp/rootfs + +rm -rf /tmp/boot +rm -rf /tmp/rootfs + +mkdir /tmp/boot +mkdir /tmp/rootfs + +dd if=/dev/zero of=${DRIVE1} bs=1M count=1 +mkfs.vfat -F 32 -n "boot" ${DRIVE1} +mount ${DRIVE1} /tmp/boot + +du -h ${DRIVE1} + +cp ./output/images/*.dtb /tmp/boot +cp ./output/images/uImage /tmp/boot +cp ./output/images/MLO /tmp/boot +cp ./output/images/u-boot.img /tmp/boot +cp ./output/images/rootfs.tar.gz /tmp/boot + +ls -alh /tmp/boot + +dd if=/dev/zero of=${DRIVE2} bs=1M count=1 +mkfs.ext3 -L "rootfs" ${DRIVE2} +mount ${DRIVE2} /tmp/rootfs + +du -h ${DRIVE2} +sleep 10 +tar -C /tmp/rootfs --checkpoint --checkpoint-action=dot -xzf ./output/images/rootfs.tar.gz +echo "" + +sync +sync +umount ${DRIVE1} +umount ${DRIVE2} + +#-- unmap partitions +kpartx -dsv $IMAGEFILE +#-- packen des Imagefiles +rm $IMAGEFILE.zip +zip -j $IMAGEFILE.zip $IMAGEFILE + +export LC_ALL=$SAVE_LC + \ No newline at end of file diff --git a/MakeRootfsUpdate.sh b/MakeRootfsUpdate.sh new file mode 100755 index 0000000..df6e200 --- /dev/null +++ b/MakeRootfsUpdate.sh @@ -0,0 +1,62 @@ +#!/bin/bash +WRKDIR=/tmp/XXXUpdateRootfs +BUILD=`cat ../GfA/board/GfA/Display001/BUILD` +UPDATE_BINARY=$WRKDIR/dest/UpdateRootfs.tar.Z +UPDATE_FILENAME="../UpdateDisplay001_$BUILD.sh" +UPDATE_IN_SCRIPT="UpdateRootfs.sh.in" + +rm -rf $WRKDIR +mkdir -p $WRKDIR/dest + +cp ./output/images/*.dtb $WRKDIR +cp ./output/images/uImage $WRKDIR +cp ./output/images/MLO $WRKDIR +cp ./output/images/u-boot.img $WRKDIR +cp ./output/images/rootfs.tar.gz $WRKDIR + +tar -C $WRKDIR --exclude=./dest -czvf $WRKDIR/dest/UpdateRootfs.tar.Z ./ + +# Check for payload format option (default is binary). +binary=1 +uuencode=0 + +if [[ "$1" == '--binary' ]]; then + binary=1 + uuencode=0 + shift +fi +if [[ "$1" == '--uuencode' ]]; then + binary=0 + uuencode=1 + shift +fi + +if [[ ! -f $UPDATE_BINARY ]]; then + echo " UPDATE_BINARY $UPDATE_BINARY doesn't exist!" + echo "Usage: $0 [--binary | --uuencode]" + exit 1 +fi + + +if [[ $binary -ne 0 ]]; then + # Append binary data. + sed \ + -e 's/uuencode=./uuencode=0/' \ + -e 's/binary=./binary=1/' \ + $UPDATE_IN_SCRIPT > $UPDATE_FILENAME + echo "PAYLOAD:" >> $UPDATE_FILENAME + + cat $UPDATE_BINARY >> $UPDATE_FILENAME +fi +if [[ $uuencode -ne 0 ]]; then + # Append uuencoded data. + sed \ + -e 's/uuencode=./uuencode=1/' \ + -e 's/binary=./binary=0/' \ + $UPDATE_IN_SCRIPT > $UPDATE_FILENAME + echo "PAYLOAD:" >> $UPDATE_FILENAME + + cat $UPDATE_BINARY | uuencode - >> $UPDATE_FILENAME +fi + +chmod a+x $UPDATE_FILENAME diff --git a/MapImage.sh b/MapImage.sh new file mode 100755 index 0000000..4905205 --- /dev/null +++ b/MapImage.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +SAVE_LC=$LC_ALL +export LC_ALL=C + +BUILD=`cat board/GfA/Display001/BUILD` +IMAGEFILE=../Display001_Build_$BUILD-img +echo ">>> $IMAGEFILE <<<" +#-- map partitions +DRIVE1=/dev/mapper/`kpartx -s -l $IMAGEFILE | head -n 1 | awk '{print $1}'` +DRIVE2=/dev/mapper/`kpartx -s -l $IMAGEFILE | head -n 2 | tail -n 1 | awk '{print $1}'` + +echo ">>>>>>>>>>>>>>>>>>" +echo $DRIVE1 +echo $DRIVE2 +echo ">>>>>>>>>>>>>>>>>>" + +kpartx -asv $IMAGEFILE +#-- mount partitions +umount /tmp/boot +umount /tmp/rootfs + +rm -rf /tmp/boot +rm -rf /tmp/rootfs + +mkdir /tmp/boot +mkdir /tmp/rootfs + +mount ${DRIVE1} /tmp/boot +mount ${DRIVE2} /tmp/rootfs + +bash + +umount ${DRIVE1} +umount ${DRIVE2} + +#-- unmap partitions +kpartx -dsv $IMAGEFILE + +export LC_ALL=$SAVE_LC + \ No newline at end of file diff --git a/UpdateRootfs.sh.in b/UpdateRootfs.sh.in new file mode 100644 index 0000000..4706719 --- /dev/null +++ b/UpdateRootfs.sh.in @@ -0,0 +1,77 @@ +#!/bin/sh + +uuencode=0 +binary=1 + +##TAR_PARAMETERS="-C / --exclude=./opt --exclude=./etc/inittab -xzvf -" +TMP_PATH="/__GfA_Update" +TAR_PARAMETERS="-C $TMP_PATH -xzvf -" + +untar_payload () +{ + + echo "remove $TMP_PATH : " + rm -rf $TMP_PATH + echo ">> $? " + mkdir -p $TMP_PATH + + match=$(grep -n -m 1 '^PAYLOAD:$' $0 | cut -d ':' -f 1) + payload_start=$((match + 1)) + if [[ $binary -ne 0 ]]; then + tail -n +$payload_start $0 | tar $TAR_PARAMETERS + fi + if [[ $uuencode -ne 0 ]]; then + tail -n +$payload_start $0 | uudecode | tar $TAR_PARAMETERS + fi +} + +## --- Kommandos zum Installieren +## -- get bootpartition +such="root=/dev/mmcblk1" +grep -q $such /proc/cmdline +if [ $? == 0 ] +then + bootpart="/dev/mmcblk1p1" +else + bootpart="/dev/mmcblk0p1" +fi + +umount /mnt +mount $bootpart /mnt + +## -- alte Firmwarebinaries löschen +rm /root/btm*.bin + +#--- Kernel MLO und Rootfs-Tarball entpacken +untar_payload +# --- + +rm /mnt/rootfs.tar.gz +cp $TMP_PATH/MLO /mnt +cp $TMP_PATH/u-boot.img /mnt +cp $TMP_PATH/uImage /mnt +cp $TMP_PATH/*.dtb /mnt + +#rootfs auspacken +tar -C / --exclude=./opt --exclude=./etc/inittab --exclude=./etc/network/interfaces -xzvf $TMP_PATH/rootfs.tar.gz + +echo "sync mmc be patient ...." +sync +sync + +if [ -e /etc/init.d/S98usb_g_ether ] +then + cp /etc/init.d/S98usb_g_ether /etc/init.d/M98usb_g_ether + rm /etc/init.d/S98usb_g_ether +fi + +#echo "Update Firmware" +#echo "." +#/root/spi_tivia /root/btm43_0107.bin >/dev/null +#echo ".." +#echo "Update Firmware Done" +#/root/gfa_spi -v +echo "Update Done, pls. reboot System" +umount /mnt +echo "." +exit 0 diff --git a/board/beaglebone/patches/linux/0002-arm-Export-cache-flush-management-symbols-when-MULTI.patch b/board/beaglebone/patches/linux/0002-arm-Export-cache-flush-management-symbols-when-MULTI.patch new file mode 100644 index 0000000..1ca1e70 --- /dev/null +++ b/board/beaglebone/patches/linux/0002-arm-Export-cache-flush-management-symbols-when-MULTI.patch @@ -0,0 +1,34 @@ +From 29885f2f3d700341d322274db6ad085e601c0994 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Fri, 4 Jan 2013 00:32:33 +0200 +Subject: [PATCH 3/3] arm: Export cache flush management symbols when + !MULTI_CACHE + +When compiling a kernel without CONFIG_MULTI_CACHE enabled the +dma access functions end up not being exported. Fix it. + +Signed-off-by: Pantelis Antoniou +--- + arch/arm/kernel/setup.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c +index da1d1aa..dcb678c 100644 +--- a/arch/arm/kernel/setup.c ++++ b/arch/arm/kernel/setup.c +@@ -923,3 +923,12 @@ const struct seq_operations cpuinfo_op = { + .stop = c_stop, + .show = c_show + }; ++ ++/* export the cache management functions */ ++#ifndef MULTI_CACHE ++ ++EXPORT_SYMBOL(__glue(_CACHE,_dma_map_area)); ++EXPORT_SYMBOL(__glue(_CACHE,_dma_unmap_area)); ++EXPORT_SYMBOL(__glue(_CACHE,_dma_flush_range)); ++ ++#endif +-- +1.7.10.4 + diff --git a/package/gcc/4.9.1/100-uclibc-conf.patch b/package/gcc/4.9.1/100-uclibc-conf.patch new file mode 100644 index 0000000..d56bf0a --- /dev/null +++ b/package/gcc/4.9.1/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.9.1/301-missing-execinfo_h.patch b/package/gcc/4.9.1/301-missing-execinfo_h.patch new file mode 100644 index 0000000..00efda2 --- /dev/null +++ b/package/gcc/4.9.1/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.9.1/302-c99-snprintf.patch b/package/gcc/4.9.1/302-c99-snprintf.patch new file mode 100644 index 0000000..cd4d2cc --- /dev/null +++ b/package/gcc/4.9.1/302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.8.0.orig/libstdc++-v3/include/c_global/cstdio 2013-02-03 18:54:05.000000000 +0100 ++++ gcc-4.8.0/libstdc++-v3/include/c_global/cstdio 2013-03-23 17:39:32.000000000 +0100 +@@ -138,7 +138,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.9.1/810-arm-softfloat-libgcc.patch b/package/gcc/4.9.1/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000..c8cb377 --- /dev/null +++ b/package/gcc/4.9.1/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: gcc-4.8.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100 +@@ -55,7 +55,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: gcc-4.8.0/libgcc/config/arm/t-linux +=================================================================== +--- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100 ++++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100 +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.9.1/830-arm_unbreak_armv4t.patch b/package/gcc/4.9.1/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000..37f8f2a --- /dev/null +++ b/package/gcc/4.9.1/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.9.1/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/4.9.1/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 0000000..e116e2b --- /dev/null +++ b/package/gcc/4.9.1/840-microblaze-enable-dwarf-eh-support.patch @@ -0,0 +1,169 @@ +Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc + +From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 +From: "Edgar E. Iglesias" +Date: Mon, 18 Jun 2012 20:18:13 +0200 +Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. + +Changelog + +2013-03-18 Edgar E. Iglesias + David Holsgrove + + * common/config/microblaze/microblaze-common.c: Remove + TARGET_EXCEPT_UNWIND_INFO definition. + * config/microblaze/microblaze-protos.h: Add + microblaze_eh_return prototype. + * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, + microblaze_expand_epilogue, microblaze_return_addr): Handle + calls_eh_return + (microblaze_eh_return): New function. + * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, + EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, + ASM_PREFERRED_EH_DATA_FORMAT + * gcc/config/microblaze/microblaze.md: Define eh_return pattern. + +Signed-off-by: David Holsgrove +Signed-off-by: Edgar E. Iglesias +--- + gcc/common/config/microblaze/microblaze-common.c | 3 --- + gcc/config/microblaze/microblaze-protos.h | 1 + + gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- + gcc/config/microblaze/microblaze.h | 15 ++++++++++++ + gcc/config/microblaze/microblaze.md | 11 +++++++++ + 5 files changed, 52 insertions(+), 7 deletions(-) + +diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c +index 5835acc..85e6a53 100644 +--- a/gcc/common/config/microblaze/microblaze-common.c ++++ b/gcc/common/config/microblaze/microblaze-common.c +@@ -39,7 +39,4 @@ static const struct default_options microblaze_option_optimization_table[] = + #undef TARGET_OPTION_OPTIMIZATION_TABLE + #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table + +-#undef TARGET_EXCEPT_UNWIND_INFO +-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +- + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; +diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h +index c30ec72..260f4e4 100644 +--- a/gcc/config/microblaze/microblaze-protos.h ++++ b/gcc/config/microblaze/microblaze-protos.h +@@ -56,6 +56,7 @@ extern bool microblaze_tls_referenced_p (rtx); + extern int symbol_mentioned_p (rtx); + extern int label_mentioned_p (rtx); + extern bool microblaze_cannot_force_const_mem (enum machine_mode, rtx); ++extern void microblaze_eh_return (rtx op0); + #endif /* RTX_CODE */ + + /* Declare functions in microblaze-c.c. */ +diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c +index fe61fce..15166d3 100644 +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -1999,6 +1999,11 @@ microblaze_must_save_register (int regno) + if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) + return 1; + ++ if (crtl->calls_eh_return ++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { ++ return 1; ++ } ++ + if (!crtl->is_leaf) + { + if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) +@@ -2026,6 +2031,13 @@ microblaze_must_save_register (int regno) + return 1; + } + ++ if (crtl->calls_eh_return ++ && (regno == EH_RETURN_DATA_REGNO (0) ++ || regno == EH_RETURN_DATA_REGNO (1))) ++ { ++ return 1; ++ } ++ + return 0; + } + +@@ -3131,6 +3143,12 @@ microblaze_expand_epilogue (void) + emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); + } + ++ if (crtl->calls_eh_return) ++ emit_insn (gen_addsi3 (stack_pointer_rtx, ++ stack_pointer_rtx, ++ gen_rtx_raw_REG (SImode, ++ MB_EH_STACKADJ_REGNUM))); ++ + emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + + MB_ABI_SUB_RETURN_ADDR_REGNUM))); + } +@@ -3427,10 +3445,13 @@ microblaze_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) + if (count != 0) + return NULL_RTX; + +- return gen_rtx_PLUS (Pmode, +- get_hard_reg_initial_val (Pmode, +- MB_ABI_SUB_RETURN_ADDR_REGNUM), +- GEN_INT (8)); ++ return get_hard_reg_initial_val (Pmode, ++ MB_ABI_SUB_RETURN_ADDR_REGNUM); ++} ++ ++void microblaze_eh_return (rtx op0) ++{ ++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); + } + + /* Queue an .ident string in the queue of top-level asm statements. +diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h +index 4072283..5e9f49c 100644 +--- a/gcc/config/microblaze/microblaze.h ++++ b/gcc/config/microblaze/microblaze.h +@@ -184,6 +184,21 @@ extern enum pipeline_type microblaze_pipe; + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + ++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ ++#define RETURN_ADDR_OFFSET (8) ++ ++/* Describe how we implement __builtin_eh_return. */ ++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) ++ ++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) ++ + /* Use DWARF 2 debugging information by default. */ + #define DWARF2_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md +index ed6131a..dc2405f 100644 +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -2327,4 +2327,15 @@ + (set_attr "mode" "SI") + (set_attr "length" "4")]) + ++; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand" ""))] ++ "" ++ " ++{ ++ microblaze_eh_return(operands[0]); ++ DONE; ++}") ++ + (include "sync.md") ++ +-- +1.8.3.2 + diff --git a/package/gcc/4.9.1/841-PR60102.patch b/package/gcc/4.9.1/841-PR60102.patch new file mode 100644 index 0000000..e34695d --- /dev/null +++ b/package/gcc/4.9.1/841-PR60102.patch @@ -0,0 +1,388 @@ +From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102 +Target: 4.9.2 + +Signed-off-by: Gustavo Zacarias + +diff -Nura gcc-4.9.1.orig/gcc/config/rs6000/rs6000.c gcc-4.9.1/gcc/config/rs6000/rs6000.c +--- gcc-4.9.1.orig/gcc/config/rs6000/rs6000.c 2014-08-05 14:53:37.294498582 -0300 ++++ gcc-4.9.1/gcc/config/rs6000/rs6000.c 2014-08-05 14:58:33.972555735 -0300 +@@ -1221,7 +1221,12 @@ + /* Soft frame pointer. */ + "sfp", + /* HTM SPR registers. */ +- "tfhar", "tfiar", "texasr" ++ "tfhar", "tfiar", "texasr", ++ /* SPE High registers. */ ++ "0", "1", "2", "3", "4", "5", "6", "7", ++ "8", "9", "10", "11", "12", "13", "14", "15", ++ "16", "17", "18", "19", "20", "21", "22", "23", ++ "24", "25", "26", "27", "28", "29", "30", "31" + }; + + #ifdef TARGET_REGNAMES +@@ -1249,7 +1254,12 @@ + /* Soft frame pointer. */ + "sfp", + /* HTM SPR registers. */ +- "tfhar", "tfiar", "texasr" ++ "tfhar", "tfiar", "texasr", ++ /* SPE High registers. */ ++ "%rh0", "%rh1", "%rh2", "%rh3", "%rh4", "%rh5", "%rh6", "%rh7", ++ "%rh8", "%rh9", "%rh10", "%r11", "%rh12", "%rh13", "%rh14", "%rh15", ++ "%rh16", "%rh17", "%rh18", "%rh19", "%rh20", "%rh21", "%rh22", "%rh23", ++ "%rh24", "%rh25", "%rh26", "%rh27", "%rh28", "%rh29", "%rh30", "%rh31" + }; + #endif + +@@ -31074,13 +31084,13 @@ + { + if (BYTES_BIG_ENDIAN) + { +- parts[2 * i] = gen_rtx_REG (SImode, regno + 1200); ++ parts[2 * i] = gen_rtx_REG (SImode, regno + FIRST_SPE_HIGH_REGNO); + parts[2 * i + 1] = gen_rtx_REG (SImode, regno); + } + else + { + parts[2 * i] = gen_rtx_REG (SImode, regno); +- parts[2 * i + 1] = gen_rtx_REG (SImode, regno + 1200); ++ parts[2 * i + 1] = gen_rtx_REG (SImode, regno + FIRST_SPE_HIGH_REGNO); + } + } + +@@ -31100,11 +31110,11 @@ + rtx mem = gen_rtx_MEM (BLKmode, addr); + rtx value = gen_int_mode (4, mode); + +- for (i = 1201; i < 1232; i++) ++ for (i = FIRST_SPE_HIGH_REGNO; i < LAST_SPE_HIGH_REGNO+1; i++) + { +- int column = DWARF_REG_TO_UNWIND_COLUMN (i); +- HOST_WIDE_INT offset +- = DWARF_FRAME_REGNUM (column) * GET_MODE_SIZE (mode); ++ int column = DWARF_REG_TO_UNWIND_COLUMN ++ (DWARF2_FRAME_REG_OUT (DWARF_FRAME_REGNUM (i), true)); ++ HOST_WIDE_INT offset = column * GET_MODE_SIZE (mode); + + emit_move_insn (adjust_address (mem, mode, offset), value); + } +@@ -31123,9 +31133,9 @@ + + for (i = FIRST_ALTIVEC_REGNO; i < LAST_ALTIVEC_REGNO+1; i++) + { +- int column = DWARF_REG_TO_UNWIND_COLUMN (i); +- HOST_WIDE_INT offset +- = DWARF_FRAME_REGNUM (column) * GET_MODE_SIZE (mode); ++ int column = DWARF_REG_TO_UNWIND_COLUMN ++ (DWARF2_FRAME_REG_OUT (DWARF_FRAME_REGNUM (i), true)); ++ HOST_WIDE_INT offset = column * GET_MODE_SIZE (mode); + + emit_move_insn (adjust_address (mem, mode, offset), value); + } +@@ -31157,9 +31167,8 @@ + return 99; + if (regno == SPEFSCR_REGNO) + return 612; +- /* SPE high reg number. We get these values of regno from +- rs6000_dwarf_register_span. */ +- gcc_assert (regno >= 1200 && regno < 1232); ++ if (SPE_HIGH_REGNO_P (regno)) ++ return regno - FIRST_SPE_HIGH_REGNO + 1200; + return regno; + } + +diff -Nura gcc-4.9.1.orig/gcc/config/rs6000/rs6000.h gcc-4.9.1/gcc/config/rs6000/rs6000.h +--- gcc-4.9.1.orig/gcc/config/rs6000/rs6000.h 2014-08-05 14:53:37.291498480 -0300 ++++ gcc-4.9.1/gcc/config/rs6000/rs6000.h 2014-08-05 14:58:33.974555802 -0300 +@@ -930,35 +930,36 @@ + + The 3 HTM registers aren't also included in DWARF_FRAME_REGISTERS. */ + +-#define FIRST_PSEUDO_REGISTER 117 ++#define FIRST_PSEUDO_REGISTER 149 + + /* This must be included for pre gcc 3.0 glibc compatibility. */ + #define PRE_GCC3_DWARF_FRAME_REGISTERS 77 + +-/* Add 32 dwarf columns for synthetic SPE registers. */ +-#define DWARF_FRAME_REGISTERS ((FIRST_PSEUDO_REGISTER - 4) + 32) ++/* True if register is an SPE High register. */ ++#define SPE_HIGH_REGNO_P(N) \ ++ ((N) >= FIRST_SPE_HIGH_REGNO && (N) <= LAST_SPE_HIGH_REGNO) ++ ++/* SPE high registers added as hard regs. ++ The sfp register and 3 HTM registers ++ aren't included in DWARF_FRAME_REGISTERS. */ ++#define DWARF_FRAME_REGISTERS (FIRST_PSEUDO_REGISTER - 4) + + /* The SPE has an additional 32 synthetic registers, with DWARF debug + info numbering for these registers starting at 1200. While eh_frame + register numbering need not be the same as the debug info numbering, +- we choose to number these regs for eh_frame at 1200 too. This allows +- future versions of the rs6000 backend to add hard registers and +- continue to use the gcc hard register numbering for eh_frame. If the +- extra SPE registers in eh_frame were numbered starting from the +- current value of FIRST_PSEUDO_REGISTER, then if FIRST_PSEUDO_REGISTER +- changed we'd need to introduce a mapping in DWARF_FRAME_REGNUM to +- avoid invalidating older SPE eh_frame info. ++ we choose to number these regs for eh_frame at 1200 too. + + We must map them here to avoid huge unwinder tables mostly consisting + of unused space. */ + #define DWARF_REG_TO_UNWIND_COLUMN(r) \ +- ((r) > 1200 ? ((r) - 1200 + (DWARF_FRAME_REGISTERS - 32)) : (r)) ++ ((r) >= 1200 ? ((r) - 1200 + (DWARF_FRAME_REGISTERS - 32)) : (r)) + + /* Use standard DWARF numbering for DWARF debugging information. */ + #define DBX_REGISTER_NUMBER(REGNO) rs6000_dbx_register_number (REGNO) + + /* Use gcc hard register numbering for eh_frame. */ +-#define DWARF_FRAME_REGNUM(REGNO) (REGNO) ++#define DWARF_FRAME_REGNUM(REGNO) \ ++ (SPE_HIGH_REGNO_P (REGNO) ? ((REGNO) - FIRST_SPE_HIGH_REGNO + 1200) : (REGNO)) + + /* Map register numbers held in the call frame info that gcc has + collected using DWARF_FRAME_REGNUM to those that should be output in +@@ -992,7 +993,10 @@ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 1, 1 \ +- , 1, 1, 1, 1, 1, 1 \ ++ , 1, 1, 1, 1, 1, 1, \ ++ /* SPE High registers. */ \ ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ + } + + /* 1 for registers not available across function calls. +@@ -1012,7 +1016,10 @@ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 1, 1 \ +- , 1, 1, 1, 1, 1, 1 \ ++ , 1, 1, 1, 1, 1, 1, \ ++ /* SPE High registers. */ \ ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ++ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 \ + } + + /* Like `CALL_USED_REGISTERS' except this macro doesn't require that +@@ -1031,7 +1038,10 @@ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ + 0, 0 \ +- , 0, 0, 0, 0, 0, 0 \ ++ , 0, 0, 0, 0, 0, 0, \ ++ /* SPE High registers. */ \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ + } + + #define TOTAL_ALTIVEC_REGS (LAST_ALTIVEC_REGNO - FIRST_ALTIVEC_REGNO + 1) +@@ -1114,7 +1124,10 @@ + 96, 95, 94, 93, 92, 91, \ + 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, \ + 109, 110, \ +- 111, 112, 113, 114, 115, 116 \ ++ 111, 112, 113, 114, 115, 116, \ ++ 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, \ ++ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, \ ++ 141, 142, 143, 144, 145, 146, 147, 148 \ + } + + /* True if register is floating-point. */ +@@ -1349,6 +1362,7 @@ + CR_REGS, + NON_FLOAT_REGS, + CA_REGS, ++ SPE_HIGH_REGS, + ALL_REGS, + LIM_REG_CLASSES + }; +@@ -1380,6 +1394,7 @@ + "CR_REGS", \ + "NON_FLOAT_REGS", \ + "CA_REGS", \ ++ "SPE_HIGH_REGS", \ + "ALL_REGS" \ + } + +@@ -1387,30 +1402,54 @@ + This is an initializer for a vector of HARD_REG_SET + of length N_REG_CLASSES. */ + +-#define REG_CLASS_CONTENTS \ +-{ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ +- { 0xfffffffe, 0x00000000, 0x00000008, 0x00020000 }, /* BASE_REGS */ \ +- { 0xffffffff, 0x00000000, 0x00000008, 0x00020000 }, /* GENERAL_REGS */ \ +- { 0x00000000, 0xffffffff, 0x00000000, 0x00000000 }, /* FLOAT_REGS */ \ +- { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff }, /* ALTIVEC_REGS */ \ +- { 0x00000000, 0xffffffff, 0xffffe000, 0x00001fff }, /* VSX_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00002000 }, /* VRSAVE_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00004000 }, /* VSCR_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00008000 }, /* SPE_ACC_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00010000 }, /* SPEFSCR_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000000, 0x00040000 }, /* SPR_REGS */ \ +- { 0xffffffff, 0xffffffff, 0x00000008, 0x00020000 }, /* NON_SPECIAL_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000002, 0x00000000 }, /* LINK_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000004, 0x00000000 }, /* CTR_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000006, 0x00000000 }, /* LINK_OR_CTR_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000006, 0x00002000 }, /* SPECIAL_REGS */ \ +- { 0xffffffff, 0x00000000, 0x0000000e, 0x00022000 }, /* SPEC_OR_GEN_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */ \ +- { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \ +- { 0xffffffff, 0x00000000, 0x00000ffe, 0x00020000 }, /* NON_FLOAT_REGS */ \ +- { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* CA_REGS */ \ +- { 0xffffffff, 0xffffffff, 0xfffffffe, 0x0007ffff } /* ALL_REGS */ \ ++#define REG_CLASS_CONTENTS \ ++{ \ ++ /* NO_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, \ ++ /* BASE_REGS. */ \ ++ { 0xfffffffe, 0x00000000, 0x00000008, 0x00020000, 0x00000000 }, \ ++ /* GENERAL_REGS. */ \ ++ { 0xffffffff, 0x00000000, 0x00000008, 0x00020000, 0x00000000 }, \ ++ /* FLOAT_REGS. */ \ ++ { 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000 }, \ ++ /* ALTIVEC_REGS. */ \ ++ { 0x00000000, 0x00000000, 0xffffe000, 0x00001fff, 0x00000000 }, \ ++ /* VSX_REGS. */ \ ++ { 0x00000000, 0xffffffff, 0xffffe000, 0x00001fff, 0x00000000 }, \ ++ /* VRSAVE_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00002000, 0x00000000 }, \ ++ /* VSCR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00004000, 0x00000000 }, \ ++ /* SPE_ACC_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00008000, 0x00000000 }, \ ++ /* SPEFSCR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00010000, 0x00000000 }, \ ++ /* SPR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0x00040000, 0x00000000 }, \ ++ /* NON_SPECIAL_REGS. */ \ ++ { 0xffffffff, 0xffffffff, 0x00000008, 0x00020000, 0x00000000 }, \ ++ /* LINK_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000002, 0x00000000, 0x00000000 }, \ ++ /* CTR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x00000000 }, \ ++ /* LINK_OR_CTR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000006, 0x00000000, 0x00000000 }, \ ++ /* SPECIAL_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000006, 0x00002000, 0x00000000 }, \ ++ /* SPEC_OR_GEN_REGS. */ \ ++ { 0xffffffff, 0x00000000, 0x0000000e, 0x00022000, 0x00000000 }, \ ++ /* CR0_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000010, 0x00000000, 0x00000000 }, \ ++ /* CR_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000, 0x00000000 }, \ ++ /* NON_FLOAT_REGS. */ \ ++ { 0xffffffff, 0x00000000, 0x00000ffe, 0x00020000, 0x00000000 }, \ ++ /* CA_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00001000, 0x00000000, 0x00000000 }, \ ++ /* SPE_HIGH_REGS. */ \ ++ { 0x00000000, 0x00000000, 0x00000000, 0xffe00000, 0x001fffff }, \ ++ /* ALL_REGS. */ \ ++ { 0xffffffff, 0xffffffff, 0xfffffffe, 0xffe7ffff, 0x001fffff } \ + } + + /* The same information, inverted: +@@ -2349,6 +2388,39 @@ + &rs6000_reg_names[114][0], /* tfhar */ \ + &rs6000_reg_names[115][0], /* tfiar */ \ + &rs6000_reg_names[116][0], /* texasr */ \ ++ \ ++ &rs6000_reg_names[117][0], /* SPE rh0. */ \ ++ &rs6000_reg_names[118][0], /* SPE rh1. */ \ ++ &rs6000_reg_names[119][0], /* SPE rh2. */ \ ++ &rs6000_reg_names[120][0], /* SPE rh3. */ \ ++ &rs6000_reg_names[121][0], /* SPE rh4. */ \ ++ &rs6000_reg_names[122][0], /* SPE rh5. */ \ ++ &rs6000_reg_names[123][0], /* SPE rh6. */ \ ++ &rs6000_reg_names[124][0], /* SPE rh7. */ \ ++ &rs6000_reg_names[125][0], /* SPE rh8. */ \ ++ &rs6000_reg_names[126][0], /* SPE rh9. */ \ ++ &rs6000_reg_names[127][0], /* SPE rh10. */ \ ++ &rs6000_reg_names[128][0], /* SPE rh11. */ \ ++ &rs6000_reg_names[129][0], /* SPE rh12. */ \ ++ &rs6000_reg_names[130][0], /* SPE rh13. */ \ ++ &rs6000_reg_names[131][0], /* SPE rh14. */ \ ++ &rs6000_reg_names[132][0], /* SPE rh15. */ \ ++ &rs6000_reg_names[133][0], /* SPE rh16. */ \ ++ &rs6000_reg_names[134][0], /* SPE rh17. */ \ ++ &rs6000_reg_names[135][0], /* SPE rh18. */ \ ++ &rs6000_reg_names[136][0], /* SPE rh19. */ \ ++ &rs6000_reg_names[137][0], /* SPE rh20. */ \ ++ &rs6000_reg_names[138][0], /* SPE rh21. */ \ ++ &rs6000_reg_names[139][0], /* SPE rh22. */ \ ++ &rs6000_reg_names[140][0], /* SPE rh22. */ \ ++ &rs6000_reg_names[141][0], /* SPE rh24. */ \ ++ &rs6000_reg_names[142][0], /* SPE rh25. */ \ ++ &rs6000_reg_names[143][0], /* SPE rh26. */ \ ++ &rs6000_reg_names[144][0], /* SPE rh27. */ \ ++ &rs6000_reg_names[145][0], /* SPE rh28. */ \ ++ &rs6000_reg_names[146][0], /* SPE rh29. */ \ ++ &rs6000_reg_names[147][0], /* SPE rh30. */ \ ++ &rs6000_reg_names[148][0], /* SPE rh31. */ \ + } + + /* Table of additional register names to use in user input. */ +@@ -2404,7 +2476,17 @@ + {"vs56", 101},{"vs57", 102},{"vs58", 103},{"vs59", 104}, \ + {"vs60", 105},{"vs61", 106},{"vs62", 107},{"vs63", 108}, \ + /* Transactional Memory Facility (HTM) Registers. */ \ +- {"tfhar", 114}, {"tfiar", 115}, {"texasr", 116} } ++ {"tfhar", 114}, {"tfiar", 115}, {"texasr", 116}, \ ++ /* SPE high registers. */ \ ++ {"rh0", 117}, {"rh1", 118}, {"rh2", 119}, {"rh3", 120}, \ ++ {"rh4", 121}, {"rh5", 122}, {"rh6", 123}, {"rh7", 124}, \ ++ {"rh8", 125}, {"rh9", 126}, {"rh10", 127}, {"rh11", 128}, \ ++ {"rh12", 129}, {"rh13", 130}, {"rh14", 131}, {"rh15", 132}, \ ++ {"rh16", 133}, {"rh17", 134}, {"rh18", 135}, {"rh19", 136}, \ ++ {"rh20", 137}, {"rh21", 138}, {"rh22", 139}, {"rh23", 140}, \ ++ {"rh24", 141}, {"rh25", 142}, {"rh26", 143}, {"rh27", 144}, \ ++ {"rh28", 145}, {"rh29", 146}, {"rh30", 147}, {"rh31", 148}, \ ++} + + /* This is how to output an element of a case-vector that is relative. */ + +diff -Nura gcc-4.9.1.orig/gcc/config/rs6000/rs6000.md gcc-4.9.1/gcc/config/rs6000/rs6000.md +--- gcc-4.9.1.orig/gcc/config/rs6000/rs6000.md 2014-08-05 14:53:37.292498514 -0300 ++++ gcc-4.9.1/gcc/config/rs6000/rs6000.md 2014-08-05 14:58:33.977555904 -0300 +@@ -56,6 +56,8 @@ + (TFHAR_REGNO 114) + (TFIAR_REGNO 115) + (TEXASR_REGNO 116) ++ (FIRST_SPE_HIGH_REGNO 117) ++ (LAST_SPE_HIGH_REGNO 148) + ]) + + ;; +diff -Nura gcc-4.9.1.orig/gcc/testsuite/gcc.target/powerpc/pr60102.c gcc-4.9.1/gcc/testsuite/gcc.target/powerpc/pr60102.c +--- gcc-4.9.1.orig/gcc/testsuite/gcc.target/powerpc/pr60102.c 1969-12-31 21:00:00.000000000 -0300 ++++ gcc-4.9.1/gcc/testsuite/gcc.target/powerpc/pr60102.c 2014-08-05 14:58:13.847873524 -0300 +@@ -0,0 +1,11 @@ ++/* { dg-do compile } */ ++/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ ++/* { dg-options "-mcpu=8548 -mspe -mabi=spe -g -mfloat-gprs=double" } */ ++ ++double ++pr60102 (double x, int m) ++{ ++ double y; ++ y = m % 2 ? x : 1; ++ return y; ++} +diff -Nura gcc-4.9.1.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.9.1/libgcc/config/rs6000/linux-unwind.h +--- gcc-4.9.1.orig/libgcc/config/rs6000/linux-unwind.h 2014-08-05 14:53:48.900892029 -0300 ++++ gcc-4.9.1/libgcc/config/rs6000/linux-unwind.h 2014-08-05 14:58:33.979555972 -0300 +@@ -274,8 +274,8 @@ + #ifdef __SPE__ + for (i = 14; i < 32; i++) + { +- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET; +- fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset ++ fs->regs.reg[i + FIRST_SPE_HIGH_REGNO - 4].how = REG_SAVED_OFFSET; ++ fs->regs.reg[i + FIRST_SPE_HIGH_REGNO - 4].loc.offset + = (long) ®s->vregs - new_cfa + 4 * i; + } + #endif diff --git a/package/gcc/4.9.1/900-musl-support.patch b/package/gcc/4.9.1/900-musl-support.patch new file mode 100644 index 0000000..5b3dfa5 --- /dev/null +++ b/package/gcc/4.9.1/900-musl-support.patch @@ -0,0 +1,696 @@ +Add musl support to gcc + +This patch comes from the musl-cross project at +https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: + + * the config.sub modifications have been removed, because Buildroot + already overwrites all config.sub with a more recent config.sub + that has musl support. + + * change to ensure that a dummy dynamic linker path + MUSL_DYNAMIC_LINKER is defined for all architectures, + otherwise building gcc for architectures not supported by musl was + causing build failure. Bug reported upstream at + https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. + +[Gustavo: remove upstream applied gcc/config/sh/sh.c chunk for 4.9.1] +Signed-off-by: Thomas Petazzoni +--- + +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -594,7 +594,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -719,6 +719,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2323,6 +2326,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -22,6 +22,8 @@ + #define GCC_AARCH64_LINUX_H + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" + + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,5 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -53,18 +55,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -82,23 +87,103 @@ + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" + ++/* Musl dynamic linker paths must be defined on a per-architecture ++ basis, for each architecture supported by Musl. However, in order ++ to let other architectures continue to build with other C ++ libraries, we provide a dummy definition of the following defines. */ ++#define MUSL_DYNAMIC_LINKER "invalid" ++#define MUSL_DYNAMIC_LINKER32 "invalid" ++#define MUSL_DYNAMIC_LINKER64 "invalid" ++#define MUSL_DYNAMIC_LINKERX32 "invalid" ++ + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKER32) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +Index: b/gcc/config/microblaze/linux.h +=================================================================== +--- a/gcc/config/microblaze/linux.h ++++ b/gcc/config/microblaze/linux.h +@@ -25,7 +25,23 @@ + #undef TLS_NEEDS_GOT + #define TLS_NEEDS_GOT 1 + +-#define DYNAMIC_LINKER "/lib/ld.so.1" ++#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER ++#else ++#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER ++#endif ++ ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "dynamic_linker", DYNAMIC_LINKER } +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -375,17 +375,23 @@ + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +Index: b/gcc/config/rs6000/secureplt.h +=================================================================== +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +Index: b/gcc/config/rs6000/sysv4.h +=================================================================== +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #define CC1_SPEC "%{G*} %(cc1_cpu)" \ +@@ -585,7 +588,8 @@ + + /* Override the default target of the linker. */ + #define LINK_TARGET_SPEC \ +- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") ++ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ ++ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Any specific OS flags. */ + #define LINK_OS_SPEC "\ +@@ -763,15 +767,18 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -894,6 +901,7 @@ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +Index: b/gcc/config/sh/linux.h +=================================================================== +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,7 +43,15 @@ + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ ++#define MUSL_DYNAMIC_LINKER_E "eb" ++#else ++#define MUSL_DYNAMIC_LINKER_E ++#endif ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -27300,6 +27300,9 @@ + else + gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -27332,6 +27335,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" +@@ -27421,6 +27425,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5001,6 +5001,9 @@ + gcc_cv_libc_provides_ssp, + [gcc_cv_libc_provides_ssp=no + case "$target" in ++ *-*-musl*) ++ # All versions of musl provide stack protector ++ gcc_cv_libc_provides_ssp=yes;; + *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) + # glibc 2.4 and later provides __stack_chk_fail and + # either __stack_chk_guard, or TLS access to stack guard canary. +@@ -5027,6 +5030,7 @@ + # ) and for now + # simply assert that glibc does provide this, which is true for all + # realistically usable GNU/Hurd configurations. ++ # All supported versions of musl provide it as well + gcc_cv_libc_provides_ssp=yes;; + *-*-darwin* | *-*-freebsd*) + AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], +@@ -5093,6 +5097,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/ginclude/stddef.h +=================================================================== +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -181,6 +181,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -197,6 +198,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -214,6 +216,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -46,33 +46,13 @@ + #include "unwind-compat.h" + #include "gthr.h" + +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(__BIONIC__) +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(__FreeBSD__) && __FreeBSD__ >= 7 +-# define ElfW __ElfN +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(__OpenBSD__) +-# define ElfW(type) Elf_##type +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(TARGET_DL_ITERATE_PHDR) \ +- && defined(__sun__) && defined(__svr4__) ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) + # define USE_PT_GNU_EH_FRAME ++# ifdef __OpenBSD__ ++# define ElfW(type) Elf_##type ++# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 ++# define ElfW __ElfN ++# endif + #endif + + #if defined(USE_PT_GNU_EH_FRAME) +Index: b/libgomp/config/posix/time.c +=================================================================== +--- a/libgomp/config/posix/time.c ++++ b/libgomp/config/posix/time.c +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -264,6 +264,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -272,6 +279,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; +Index: b/gcc/config/mips/linux64.h +=================================================================== +--- a/gcc/config/mips/linux64.h ++++ b/gcc/config/mips/linux64.h +@@ -41,4 +41,4 @@ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER) +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -23,3 +23,11 @@ + #undef UCLIBC_DYNAMIC_LINKER + #define UCLIBC_DYNAMIC_LINKER \ + "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1" diff --git a/package/gcc/4.9.1/powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.9.1/powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000..b7094fe --- /dev/null +++ b/package/gcc/4.9.1/powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,122 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +--- + libgcc/Makefile.in | 4 +++- + libgcc/configure | 32 ++++++++++++++++++++++++++++++++ + libgcc/configure.ac | 21 +++++++++++++++++++++ + 3 files changed, 56 insertions(+), 1 deletion(-) + +Index: gcc-4.8.0/libgcc/Makefile.in +=================================================================== +--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -927,9 +928,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +Index: gcc-4.8.0/libgcc/configure +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100 ++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100 +@@ -564,6 +564,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4481,6 +4482,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +Index: gcc-4.8.0/libgcc/configure.ac +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200 ++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100 +@@ -326,6 +326,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/4.9.3/100-uclibc-conf.patch b/package/gcc/4.9.3/100-uclibc-conf.patch new file mode 100644 index 0000000..d56bf0a --- /dev/null +++ b/package/gcc/4.9.3/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000..b7094fe --- /dev/null +++ b/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,122 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +--- + libgcc/Makefile.in | 4 +++- + libgcc/configure | 32 ++++++++++++++++++++++++++++++++ + libgcc/configure.ac | 21 +++++++++++++++++++++ + 3 files changed, 56 insertions(+), 1 deletion(-) + +Index: gcc-4.8.0/libgcc/Makefile.in +=================================================================== +--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -927,9 +928,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +Index: gcc-4.8.0/libgcc/configure +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100 ++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100 +@@ -564,6 +564,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4481,6 +4482,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +Index: gcc-4.8.0/libgcc/configure.ac +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200 ++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100 +@@ -326,6 +326,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/4.9.3/111-pr65730.patch b/package/gcc/4.9.3/111-pr65730.patch new file mode 100644 index 0000000..f195e30 --- /dev/null +++ b/package/gcc/4.9.3/111-pr65730.patch @@ -0,0 +1,37 @@ +From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 10 Apr 2015 17:46:30 +0300 +Subject: [PATCH] Fix PR target/65730 + +2015-05-20 Max Filippov +gcc/ + * config/xtensa/xtensa.c (init_alignment_context): Replace MULT + by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). + +Signed-off-by: Max Filippov +--- +Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452 +Changes to ChangeLog are dropped. + + gcc/config/xtensa/xtensa.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..7296e36 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem) + if (ac->shift != NULL_RTX) + { + /* Shift is the byte count, but we need the bitcount. */ +- ac->shift = expand_simple_binop (SImode, MULT, ac->shift, +- GEN_INT (BITS_PER_UNIT), ++ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0); ++ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift, ++ GEN_INT (exact_log2 (BITS_PER_UNIT)), + NULL_RTX, 1, OPTAB_DIRECT); + ac->modemask = expand_simple_binop (SImode, ASHIFT, + GEN_INT (GET_MODE_MASK (mode)), +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch new file mode 100644 index 0000000..c11ad35 --- /dev/null +++ b/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch @@ -0,0 +1,29 @@ +From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Fri, 6 Nov 2015 14:27:23 +0100 +Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit + +Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate +64-bit binaries by default. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gcc/config.gcc | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 4a7cbd2..9cc765e 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -439,7 +439,7 @@ powerpc*-*-*) + cpu_type=rs6000 + extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h" + case x$with_cpu in +- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) ++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500) + cpu_is_64bit=yes + ;; + esac +-- +2.6.2 + diff --git a/package/gcc/4.9.3/130-pr43538.patch b/package/gcc/4.9.3/130-pr43538.patch new file mode 100644 index 0000000..19e57bb --- /dev/null +++ b/package/gcc/4.9.3/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch b/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch new file mode 100644 index 0000000..55f3228 --- /dev/null +++ b/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch @@ -0,0 +1,37 @@ +From 3c536954a67a883630f4a7513a27f02a892c3dcb Mon Sep 17 00:00:00 2001 +From: Evgeniy Stepanov +Date: Tue, 21 Oct 2014 21:08:13 +0000 +Subject: [PATCH] [sanitizer] Fix build with _FILE_OFFSET_BITS=64. + +Sanitizer source is not affected by _FILE_OFFSET_BITS in general, +but this one file must be built with 32-bit off_t. More details in the code. + +git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220328 91177308-0d34-0410-b5e6-96231b3b80d8 +Signed-off-by: Max Filippov +--- + lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index bbc1108..fc09522 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -13,7 +13,15 @@ + + #include "sanitizer_platform.h" + #if SANITIZER_LINUX || SANITIZER_MAC ++// Tests in this file assume that off_t-dependent data structures match the ++// libc ABI. For example, struct dirent here is what readdir() function (as ++// exported from libc) returns, and not the user-facing "dirent", which ++// depends on _FILE_OFFSET_BITS setting. ++// To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. ++#ifdef _FILE_OFFSET_BITS ++#undef _FILE_OFFSET_BITS ++#endif + + #include "sanitizer_internal_defs.h" + #include "sanitizer_platform_limits_posix.h" + +-- +2.1.4 + diff --git a/package/gcc/4.9.3/301-missing-execinfo_h.patch b/package/gcc/4.9.3/301-missing-execinfo_h.patch new file mode 100644 index 0000000..00efda2 --- /dev/null +++ b/package/gcc/4.9.3/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch b/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000..c8cb377 --- /dev/null +++ b/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: gcc-4.8.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100 +@@ -55,7 +55,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: gcc-4.8.0/libgcc/config/arm/t-linux +=================================================================== +--- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100 ++++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100 +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch b/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000..37f8f2a --- /dev/null +++ b/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 0000000..e116e2b --- /dev/null +++ b/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch @@ -0,0 +1,169 @@ +Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc + +From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 +From: "Edgar E. Iglesias" +Date: Mon, 18 Jun 2012 20:18:13 +0200 +Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. + +Changelog + +2013-03-18 Edgar E. Iglesias + David Holsgrove + + * common/config/microblaze/microblaze-common.c: Remove + TARGET_EXCEPT_UNWIND_INFO definition. + * config/microblaze/microblaze-protos.h: Add + microblaze_eh_return prototype. + * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, + microblaze_expand_epilogue, microblaze_return_addr): Handle + calls_eh_return + (microblaze_eh_return): New function. + * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, + EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, + ASM_PREFERRED_EH_DATA_FORMAT + * gcc/config/microblaze/microblaze.md: Define eh_return pattern. + +Signed-off-by: David Holsgrove +Signed-off-by: Edgar E. Iglesias +--- + gcc/common/config/microblaze/microblaze-common.c | 3 --- + gcc/config/microblaze/microblaze-protos.h | 1 + + gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- + gcc/config/microblaze/microblaze.h | 15 ++++++++++++ + gcc/config/microblaze/microblaze.md | 11 +++++++++ + 5 files changed, 52 insertions(+), 7 deletions(-) + +diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c +index 5835acc..85e6a53 100644 +--- a/gcc/common/config/microblaze/microblaze-common.c ++++ b/gcc/common/config/microblaze/microblaze-common.c +@@ -39,7 +39,4 @@ static const struct default_options microblaze_option_optimization_table[] = + #undef TARGET_OPTION_OPTIMIZATION_TABLE + #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table + +-#undef TARGET_EXCEPT_UNWIND_INFO +-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +- + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; +diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h +index c30ec72..260f4e4 100644 +--- a/gcc/config/microblaze/microblaze-protos.h ++++ b/gcc/config/microblaze/microblaze-protos.h +@@ -56,6 +56,7 @@ extern bool microblaze_tls_referenced_p (rtx); + extern int symbol_mentioned_p (rtx); + extern int label_mentioned_p (rtx); + extern bool microblaze_cannot_force_const_mem (enum machine_mode, rtx); ++extern void microblaze_eh_return (rtx op0); + #endif /* RTX_CODE */ + + /* Declare functions in microblaze-c.c. */ +diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c +index fe61fce..15166d3 100644 +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -1999,6 +1999,11 @@ microblaze_must_save_register (int regno) + if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) + return 1; + ++ if (crtl->calls_eh_return ++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { ++ return 1; ++ } ++ + if (!crtl->is_leaf) + { + if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) +@@ -2026,6 +2031,13 @@ microblaze_must_save_register (int regno) + return 1; + } + ++ if (crtl->calls_eh_return ++ && (regno == EH_RETURN_DATA_REGNO (0) ++ || regno == EH_RETURN_DATA_REGNO (1))) ++ { ++ return 1; ++ } ++ + return 0; + } + +@@ -3131,6 +3143,12 @@ microblaze_expand_epilogue (void) + emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); + } + ++ if (crtl->calls_eh_return) ++ emit_insn (gen_addsi3 (stack_pointer_rtx, ++ stack_pointer_rtx, ++ gen_rtx_raw_REG (SImode, ++ MB_EH_STACKADJ_REGNUM))); ++ + emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + + MB_ABI_SUB_RETURN_ADDR_REGNUM))); + } +@@ -3427,10 +3445,13 @@ microblaze_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) + if (count != 0) + return NULL_RTX; + +- return gen_rtx_PLUS (Pmode, +- get_hard_reg_initial_val (Pmode, +- MB_ABI_SUB_RETURN_ADDR_REGNUM), +- GEN_INT (8)); ++ return get_hard_reg_initial_val (Pmode, ++ MB_ABI_SUB_RETURN_ADDR_REGNUM); ++} ++ ++void microblaze_eh_return (rtx op0) ++{ ++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); + } + + /* Queue an .ident string in the queue of top-level asm statements. +diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h +index 4072283..5e9f49c 100644 +--- a/gcc/config/microblaze/microblaze.h ++++ b/gcc/config/microblaze/microblaze.h +@@ -184,6 +184,21 @@ extern enum pipeline_type microblaze_pipe; + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + ++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ ++#define RETURN_ADDR_OFFSET (8) ++ ++/* Describe how we implement __builtin_eh_return. */ ++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) ++ ++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) ++ + /* Use DWARF 2 debugging information by default. */ + #define DWARF2_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md +index ed6131a..dc2405f 100644 +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -2327,4 +2327,15 @@ + (set_attr "mode" "SI") + (set_attr "length" "4")]) + ++; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand" ""))] ++ "" ++ " ++{ ++ microblaze_eh_return(operands[0]); ++ DONE; ++}") ++ + (include "sync.md") ++ +-- +1.8.3.2 + diff --git a/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch b/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000..d103af1 --- /dev/null +++ b/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,255 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni +[Gustavo: update for 4.9.3] + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h +--- gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h 2015-06-27 06:46:04.420022179 -0300 +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h +--- gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h 2015-06-27 06:46:04.465023743 -0300 +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h 2015-05-28 13:27:46.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h 2015-06-27 06:49:04.741284648 -0300 +@@ -2844,7 +2844,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) ++#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) + + #include + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2015-06-27 06:46:04.466023777 -0300 +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets.tcc gcc-4.9.3/libstdc++-v3/include/bits/locale_facets.tcc +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets.tcc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/locale_facets.tcc 2015-06-27 06:46:04.466023777 -0300 +@@ -987,7 +987,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/math.h gcc-4.9.3/libstdc++-v3/include/c_compatibility/math.h +--- gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/math.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_compatibility/math.h 2015-06-27 06:46:04.466023777 -0300 +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.9.3/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/wchar.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_compatibility/wchar.h 2015-06-27 06:46:04.466023777 -0300 +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdio gcc-4.9.3/libstdc++-v3/include/c_global/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdio 2014-01-23 18:17:15.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cstdio 2015-06-27 06:46:04.481024298 -0300 +@@ -146,7 +146,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdlib gcc-4.9.3/libstdc++-v3/include/c_global/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cstdlib 2015-06-27 06:46:04.466023777 -0300 +@@ -182,7 +182,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cwchar gcc-4.9.3/libstdc++-v3/include/c_global/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cwchar 2015-06-27 06:46:04.466023777 -0300 +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdio gcc-4.9.3/libstdc++-v3/include/c_std/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdio 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cstdio 2015-06-27 06:46:04.480024263 -0300 +@@ -144,7 +144,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdlib gcc-4.9.3/libstdc++-v3/include/c_std/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cstdlib 2015-06-27 06:46:04.480024263 -0300 +@@ -180,7 +180,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cwchar gcc-4.9.3/libstdc++-v3/include/c_std/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cwchar 2015-06-27 06:46:04.480024263 -0300 +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/ext/vstring.h gcc-4.9.3/libstdc++-v3/include/ext/vstring.h +--- gcc-4.9.3.orig/libstdc++-v3/include/ext/vstring.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/ext/vstring.h 2015-06-27 06:46:04.480024263 -0300 +@@ -2680,7 +2680,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdio gcc-4.9.3/libstdc++-v3/include/tr1/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdio 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cstdio 2015-06-27 06:46:04.480024263 -0300 +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdlib gcc-4.9.3/libstdc++-v3/include/tr1/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cstdlib 2015-06-27 06:46:04.480024263 -0300 +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cwchar gcc-4.9.3/libstdc++-v3/include/tr1/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cwchar 2015-06-27 06:46:04.480024263 -0300 +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/stdlib.h gcc-4.9.3/libstdc++-v3/include/tr1/stdlib.h +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/stdlib.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/stdlib.h 2015-06-27 06:46:04.481024298 -0300 +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/src/c++11/debug.cc gcc-4.9.3/libstdc++-v3/src/c++11/debug.cc +--- gcc-4.9.3.orig/libstdc++-v3/src/c++11/debug.cc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/src/c++11/debug.cc 2015-06-27 06:46:04.481024298 -0300 +@@ -788,7 +788,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); diff --git a/package/gcc/4.9.3/860-cilk-wchar.patch b/package/gcc/4.9.3/860-cilk-wchar.patch new file mode 100644 index 0000000..1837405 --- /dev/null +++ b/package/gcc/4.9.3/860-cilk-wchar.patch @@ -0,0 +1,56 @@ +[PATCH] cilk: fix build without wchar + +When building against uClibc with wchar support disabled, WCHAR_MIN and +WCHAR_MAX are not defined leading to compilation errors. + +Fix it by only including the wchar code if available. + +Signed-off-by: Peter Korsgaard +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h +=================================================================== +--- host-gcc-final-4.9.2.orig/libcilkrts/include/cilk/reducer_min_max.h ++++ host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h +@@ -3154,7 +3154,9 @@ + CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) +@@ -3306,7 +3308,9 @@ + CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) +@@ -3432,7 +3436,9 @@ + CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) +@@ -3584,7 +3590,9 @@ + CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) diff --git a/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch b/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch new file mode 100644 index 0000000..aa1376c --- /dev/null +++ b/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch @@ -0,0 +1,290 @@ +From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 6 Aug 2015 01:16:02 +0300 +Subject: [PATCH] xtensa: add -mauto-litpools option + +With support from assembler this option allows compiling huge functions, +where single literal pool at the beginning of a function may not be +reachable by L32R instructions at its end. + +Currently assembler --auto-litpools option cannot deal with literals +used from multiple locations separated by more than 256 KBytes of code. +Don't turn constants into literals, instead use MOVI instruction to load +them into registers and let the assembler turn them into literals as +necessary. + +2015-08-12 Max Filippov +gcc/ + * config/xtensa/constraints.md (define_constraint "Y"): New + constraint. + * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools. + * config/xtensa/linux.h (ASM_SPEC): Likewise. + * config/xtensa/predicates.md (move_operand): Match constants + and symbols in the presence of TARGET_AUTO_LITPOOLS. + * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow + immediate references to TLS data. + (xtensa_emit_move_sequence): Don't force constants to memory in + the presence of TARGET_AUTO_LITPOOLS. + (print_operand): Add 'y' format, same as default, but capable of + printing SF mode constants as well. + * config/xtensa/xtensa.md (movsi_internal, movhi_internal) + (movsf_internal): Add movi pattern that loads literal. + (movsf, movdf): Don't force constants to memory in the presence + of TARGET_AUTO_LITPOOLS. + (movdf_internal): Add 'Y' constraint. + * config/xtensa/xtensa.opt (mauto-litpools): New option. + +Signed-off-by: Max Filippov +--- +Backported from: r226828 +Changes to ChangeLogs and documentation are dropped. + + gcc/config/xtensa/constraints.md | 5 +++++ + gcc/config/xtensa/elf.h | 4 +++- + gcc/config/xtensa/linux.h | 4 +++- + gcc/config/xtensa/predicates.md | 3 ++- + gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++- + gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++---------------- + gcc/config/xtensa/xtensa.opt | 4 ++++ + 7 files changed, 54 insertions(+), 20 deletions(-) + +diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md +index 30f4c1f..773d4f9 100644 +--- a/gcc/config/xtensa/constraints.md ++++ b/gcc/config/xtensa/constraints.md +@@ -111,6 +111,11 @@ + (and (match_code "const_int") + (match_test "xtensa_mask_immediate (ival)"))) + ++(define_constraint "Y" ++ "A constant that can be used in relaxed MOVI instructions." ++ (and (match_code "const_int,const_double,const,symbol_ref,label_ref") ++ (match_test "TARGET_AUTO_LITPOOLS"))) ++ + ;; Memory constraints. Do not use define_memory_constraint here. Doing so + ;; causes reload to force some constants into the constant pool, but since + ;; the Xtensa constant pool can only be accessed with L32R instructions, it +diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h +index e59bede..12056f7 100644 +--- a/gcc/config/xtensa/elf.h ++++ b/gcc/config/xtensa/elf.h +@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #undef LIB_SPEC + #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal" +diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h +index 675aacf..5b0243a 100644 +--- a/gcc/config/xtensa/linux.h ++++ b/gcc/config/xtensa/linux.h +@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md +index e02209e..d7dfa11 100644 +--- a/gcc/config/xtensa/predicates.md ++++ b/gcc/config/xtensa/predicates.md +@@ -142,7 +142,8 @@ + (match_test "GET_MODE_CLASS (mode) == MODE_INT + && xtensa_simm12b (INTVAL (op))")) + (and (match_code "const_int,const_double,const,symbol_ref,label_ref") +- (match_test "TARGET_CONST16 && CONSTANT_P (op) ++ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS) ++ && CONSTANT_P (op) + && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0"))))) + + ;; Accept the floating point constant 1 in the appropriate mode. +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..206ff80 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands) + { + int dst_regnum = xt_true_regnum (operands[0]); + ++ if (xtensa_tls_referenced_p (operands[1])) ++ return FALSE; ++ + /* The stack pointer can only be assigned with a MOVSP opcode. */ + if (dst_regnum == STACK_POINTER_REGNUM) + return !TARGET_WINDOWED_ABI +@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + return 1; + } + +- if (! TARGET_CONST16) ++ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16) + { + src = force_const_mem (SImode, src); + operands[1] = src; +@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter) + } + break; + ++ case 'y': ++ if (GET_CODE (x) == CONST_DOUBLE && ++ GET_MODE (x) == SFmode) ++ { ++ REAL_VALUE_TYPE r; ++ long l; ++ REAL_VALUE_FROM_CONST_DOUBLE (r, x); ++ REAL_VALUE_TO_TARGET_SINGLE (r, l); ++ fprintf (file, "0x%08lx", l); ++ break; ++ } ++ ++ /* fall through */ ++ + default: + if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) + fprintf (file, "%s", reg_names[xt_true_regnum (x)]); +diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md +index 6d84384..0e673a3 100644 +--- a/gcc/config/xtensa/xtensa.md ++++ b/gcc/config/xtensa/xtensa.md +@@ -761,8 +761,8 @@ + }) + + (define_insn "movsi_internal" +- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A") +- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))] ++ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A") ++ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))] + "xtensa_valid_move (SImode, operands)" + "@ + movi.n\t%0, %x1 +@@ -774,15 +774,16 @@ + mov\t%0, %1 + movsp\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr") + (set_attr "mode" "SI") +- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")]) ++ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")]) + + ;; 16-bit Integer moves + +@@ -796,21 +797,22 @@ + }) + + (define_insn "movhi_internal" +- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A") +- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))] ++ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A") ++ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))] + "xtensa_valid_move (HImode, operands)" + "@ + movi.n\t%0, %x1 + mov.n\t%0, %1 + mov\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + %v1l16ui\t%0, %1 + %v0s16i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr") + (set_attr "mode" "HI") +- (set_attr "length" "2,2,3,3,3,3,3,3")]) ++ (set_attr "length" "2,2,3,3,3,3,3,3,3")]) + + ;; 8-bit Integer moves + +@@ -881,7 +883,7 @@ + (match_operand:SF 1 "general_operand" ""))] + "" + { +- if (!TARGET_CONST16 && CONSTANT_P (operands[1])) ++ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1])) + operands[1] = force_const_mem (SFmode, operands[1]); + + if ((!register_operand (operands[0], SFmode) +@@ -896,8 +898,8 @@ + }) + + (define_insn "movsf_internal" +- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U") +- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))] ++ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U") ++ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))] + "((register_operand (operands[0], SFmode) + || register_operand (operands[1], SFmode)) + && !(FP_REG_P (xt_true_regnum (operands[0])) +@@ -912,13 +914,14 @@ + mov\t%0, %1 + wfr\t%0, %1 + rfr\t%0, %1 ++ movi\t%0, %y1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0" +- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store") ++ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store") + (set_attr "mode" "SF") +- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")]) ++ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")]) + + (define_insn "*lsiu" + [(set (match_operand:SF 0 "register_operand" "=f") +@@ -991,7 +994,7 @@ + (match_operand:DF 1 "general_operand" ""))] + "" + { +- if (CONSTANT_P (operands[1]) && !TARGET_CONST16) ++ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS) + operands[1] = force_const_mem (DFmode, operands[1]); + + if (!register_operand (operands[0], DFmode) +@@ -1002,8 +1005,8 @@ + }) + + (define_insn_and_split "movdf_internal" +- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U") +- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))] ++ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U") ++ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))] + "register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode)" + "#" +diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt +index 2fd6cee..21c6e96 100644 +--- a/gcc/config/xtensa/xtensa.opt ++++ b/gcc/config/xtensa/xtensa.opt +@@ -38,6 +38,10 @@ mtext-section-literals + Target + Intersperse literal pools with code in the text section + ++mauto-litpools ++Target Report Mask(AUTO_LITPOOLS) ++Relax literals in assembler and place them automatically in the text section ++ + mserialize-volatile + Target Report Mask(SERIALIZE_VOLATILE) + -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch b/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch new file mode 100644 index 0000000..abc7a08 --- /dev/null +++ b/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch @@ -0,0 +1,76 @@ +From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 10 Aug 2015 21:35:20 +0300 +Subject: [PATCH 1/3] xtensa: reimplement register spilling + +Spilling windowed registers in userspace is much easier, more portable, +less error-prone and equally effective as in kernel. Now that register +spilling syscall is considered obsolete in the xtensa linux kernel +replace it with CALL12 followed by series of ENTRY in libgcc. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use + CALL12 followed by series of ENTRY to spill windowed registers. + (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill + instead of making linux spill syscall. + +Signed-off-by: Max Filippov +--- +Backported from: r226962 + + libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++------- + 1 file changed, 23 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S +index 3ac8c1d..2e678af 100644 +--- a/libgcc/config/xtensa/lib2funcs.S ++++ b/libgcc/config/xtensa/lib2funcs.S +@@ -33,10 +33,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + .global __xtensa_libgcc_window_spill + .type __xtensa_libgcc_window_spill,@function + __xtensa_libgcc_window_spill: +- entry sp, 32 +- movi a2, 0 +- syscall ++ entry sp, 48 ++#if XCHAL_NUM_AREGS > 16 ++ call12 1f ++ retw ++ .align 4 ++1: ++ .rept (XCHAL_NUM_AREGS - 24) / 12 ++ _entry sp, 48 ++ mov a12, a0 ++ .endr ++ _entry sp, 16 ++#if XCHAL_NUM_AREGS % 12 == 0 ++ mov a4, a4 ++#elif XCHAL_NUM_AREGS % 12 == 4 ++ mov a8, a8 ++#elif XCHAL_NUM_AREGS % 12 == 8 ++ mov a12, a12 ++#endif ++ retw ++#else ++ mov a8, a8 + retw ++#endif + .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill + + +@@ -58,10 +77,7 @@ __xtensa_nonlocal_goto: + entry sp, 32 + + /* Flush registers. */ +- mov a5, a2 +- movi a2, 0 +- syscall +- mov a2, a5 ++ call8 __xtensa_libgcc_window_spill + + /* Because the save area for a0-a3 is stored one frame below + the one identified by a2, the only way to restore those +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch new file mode 100644 index 0000000..f23a5c0 --- /dev/null +++ b/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch @@ -0,0 +1,33 @@ +From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 14 Aug 2015 02:45:02 +0300 +Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde + +This allows having exception cleanup code in binaries that don't +register their unwind tables. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde + with unwind-dw2-fde-dip. + +Signed-off-by: Max Filippov +--- +Backported from: r226963 + + libgcc/config/xtensa/t-xtensa | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/t-xtensa b/libgcc/config/xtensa/t-xtensa +index 27399e6..66d0eb3 100644 +--- a/libgcc/config/xtensa/t-xtensa ++++ b/libgcc/config/xtensa/t-xtensa +@@ -13,4 +13,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \ + LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S + + LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \ +- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c ++ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch b/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000..dc40513 --- /dev/null +++ b/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,40 @@ +From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 15 Aug 2015 05:12:11 +0300 +Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA + +Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame +higher than what was actually used by code at context->ra. This results +in invalid CFA value in signal frames and premature unwinding completion +in forced unwinding used by uClibc NPTL thread cancellation. +Returning context->sp from _Unwind_GetCFA makes all CFA values valid and +matching code that used them. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return + context->sp instead of context->cfa. + +Signed-off-by: Max Filippov +--- +Backported from: r226964 + + libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c +index 35f7797..ef6b900 100644 +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) + _Unwind_Word + _Unwind_GetCFA (struct _Unwind_Context *context) + { +- return (_Unwind_Ptr) context->cfa; ++ return (_Unwind_Ptr) context->sp; + } + + /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch b/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch new file mode 100644 index 0000000..23db3d8 --- /dev/null +++ b/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch @@ -0,0 +1,174 @@ +From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 22 Aug 2015 08:44:26 +0300 +Subject: [PATCH] xtensa: add uclinux support + +2015-10-03 Max Filippov +gcc/ + * config.gcc (xtensa*-*-uclinux*): New configuration. + * config/xtensa/uclinux.h: New file. + * config/xtensa/uclinux.opt: New file. + +libgcc/ + * config.host (xtensa*-*-uclinux*): New configuration. + +Signed-off-by: Max Filippov +--- +Backported from: r228450 + + gcc/config.gcc | 5 ++++ + gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++ + libgcc/config.host | 5 ++++ + 4 files changed, 111 insertions(+) + create mode 100644 gcc/config/xtensa/uclinux.h + create mode 100644 gcc/config/xtensa/uclinux.opt + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index c52f5a8..56797bd 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2995,6 +2995,11 @@ xtensa*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h" + tmake_file="${tmake_file} xtensa/t-xtensa" + ;; ++xtensa*-*-uclinux*) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h" ++ tmake_file="${tmake_file} xtensa/t-xtensa" ++ extra_options="${extra_options} xtensa/uclinux.opt" ++ ;; + am33_2.0-*-linux*) + tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h" + gas=yes gnu_ld=yes +diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h +new file mode 100644 +index 0000000..4606020 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.h +@@ -0,0 +1,69 @@ ++/* Xtensa uClinux configuration. ++ Derived from the configuration for GCC for Intel i386 running Linux. ++ Copyright (C) 2001-2015 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++WARRANTY; without even the implied warranty of MERCHANTABILITY or ++FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GCC; see the file COPYING3. If not see ++. */ ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ GNU_USER_TARGET_OS_CPP_BUILTINS (); \ ++ builtin_define ("__uClinux__"); \ ++ } \ ++ while (0) ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" ++ ++#undef SIZE_TYPE ++#define SIZE_TYPE "unsigned int" ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "int" ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "long int" ++ ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef ASM_SPEC ++#define ASM_SPEC \ ++ "%{mtext-section-literals:--text-section-literals} \ ++ %{mno-text-section-literals:--no-text-section-literals} \ ++ %{mtarget-align:--target-align} \ ++ %{mno-target-align:--no-target-align} \ ++ %{mlongcalls:--longcalls} \ ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}" ++ ++#undef LOCAL_LABEL_PREFIX ++#define LOCAL_LABEL_PREFIX "." ++ ++/* Always enable "-fpic" for Xtensa Linux. */ ++#define XTENSA_ALWAYS_PIC 1 ++ ++#undef TARGET_LIBC_HAS_FUNCTION ++#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function ++ ++#undef DBX_REGISTER_NUMBER ++ +diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt +new file mode 100644 +index 0000000..95ef777 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.opt +@@ -0,0 +1,32 @@ ++; Xtensa uClinux options. ++ ++; Copyright (C) 2015 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC is free software; you can redistribute it and/or modify it under ++; the terms of the GNU General Public License as published by the Free ++; Software Foundation; either version 3, or (at your option) any later ++; version. ++; ++; GCC is distributed in the hope that it will be useful, but WITHOUT ANY ++; WARRANTY; without even the implied warranty of MERCHANTABILITY or ++; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++; for more details. ++; ++; You should have received a copy of the GNU General Public License ++; along with GCC; see the file COPYING3. If not see ++; . ++ ++; See the GCC internals manual (options.texi) for a description of ++; this file's format. ++ ++; Please try to keep this file in ASCII collating order. ++ ++elf2flt ++Driver ++ ++elf2flt= ++Driver JoinedOrMissing ++ ++; This comment is to ensure we retain the blank line above. +diff --git a/libgcc/config.host b/libgcc/config.host +index 2c64756..2ee92c1 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1295,6 +1295,11 @@ xtensa*-*-linux*) + tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" + md_unwind_header=xtensa/linux-unwind.h + ;; ++xtensa*-*-uclinux*) ++ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" ++ md_unwind_header=xtensa/linux-unwind.h ++ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o" ++ ;; + am33_2.0-*-linux*) + # Don't need crtbeginT.o from *-*-linux* default. + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/880-nios2_legitimize_address.patch b/package/gcc/4.9.3/880-nios2_legitimize_address.patch new file mode 100644 index 0000000..4623f29 --- /dev/null +++ b/package/gcc/4.9.3/880-nios2_legitimize_address.patch @@ -0,0 +1,49 @@ +From b0ea54f3f995754881e0ea6651133aa7b58eeaa2 Mon Sep 17 00:00:00 2001 +From: cltang +Date: Tue, 22 Sep 2015 12:23:20 +0000 +Subject: [PATCH] nios2_legitimize_address 2015-09-22 Chung-Lin Tang + + + Backport from mainline + 2015-09-22 Chung-Lin Tang + + * config/nios2/nios2.c (nios2_legitimize_address): When handling + 'reg + reloc' cases, allow first operand to be non-REG, and use + force_reg() to enforce address pattern. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@228013 138bc75d-0d04-0410-961f-82ee72b054a4 + +Fixes: +http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0 + +[backported to 4.9.3] +Signed-off-by: Romain Naour +--- + gcc/config/nios2/nios2.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c +index 047b615..41dd6f9 100644 +--- a/gcc/config/nios2/nios2.c ++++ b/gcc/config/nios2/nios2.c +@@ -1786,15 +1786,15 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, + + Which will be output as '%tls_le(var+48)(r23)' in assembly. */ + if (GET_CODE (x) == PLUS +- && GET_CODE (XEXP (x, 0)) == REG + && GET_CODE (XEXP (x, 1)) == CONST) + { +- rtx unspec, offset, reg = XEXP (x, 0); ++ rtx unspec, offset; + split_const (XEXP (x, 1), &unspec, &offset); + if (GET_CODE (unspec) == UNSPEC + && !nios2_large_offset_p (XINT (unspec, 1)) + && offset != const0_rtx) + { ++ rtx reg = force_reg (Pmode, XEXP (x, 0)); + unspec = copy_rtx (unspec); + XVECEXP (unspec, 0, 0) + = plus_constant (Pmode, XVECEXP (unspec, 0, 0), INTVAL (offset)); +-- +2.5.0 + diff --git a/package/gcc/4.9.3/890-fix-m68k-compile.patch b/package/gcc/4.9.3/890-fix-m68k-compile.patch new file mode 100644 index 0000000..140977b --- /dev/null +++ b/package/gcc/4.9.3/890-fix-m68k-compile.patch @@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c gcc-4.9.3/libgcc/config/m68k/linux-atomic.c +--- gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c 2014-01-02 23:25:22.000000000 +0100 ++++ gcc-4.9.3/libgcc/config/m68k/linux-atomic.c 2016-03-18 22:24:40.000000000 +0100 +@@ -33,7 +33,6 @@ + using the kernel helper defined below. There is no support for + 64-bit operations yet. */ + +-#include + #include + + #ifndef __NR_atomic_cmpxchg_32 diff --git a/package/gcc/4.9.3/900-musl-support.patch b/package/gcc/4.9.3/900-musl-support.patch new file mode 100644 index 0000000..90f64de --- /dev/null +++ b/package/gcc/4.9.3/900-musl-support.patch @@ -0,0 +1,640 @@ +Add musl support to gcc + +This patch comes from the musl-cross project at +https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: + + * the config.sub modifications have been removed, because Buildroot + already overwrites all config.sub with a more recent config.sub + that has musl support. + + * change to ensure that a dummy dynamic linker path + MUSL_DYNAMIC_LINKER is defined for all architectures, + otherwise building gcc for architectures not supported by musl was + causing build failure. Bug reported upstream at + https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. + + * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic + and only add the musl one as an addition, not as a replacement. Not + doing this breaks C++ exception handling with glibc, because + USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script + not testing dl_iterate_phdr() on any system except Solaris. + +[Gustavo: remove upstream applied gcc/config/sh/sh.c chunk for 4.9.1] +Signed-off-by: Thomas Petazzoni +--- + +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -594,7 +594,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -719,6 +719,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2322,6 +2325,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -22,6 +22,8 @@ + #define GCC_AARCH64_LINUX_H + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" + + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,5 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -53,18 +55,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -82,23 +87,103 @@ + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" + ++/* Musl dynamic linker paths must be defined on a per-architecture ++ basis, for each architecture supported by Musl. However, in order ++ to let other architectures continue to build with other C ++ libraries, we provide a dummy definition of the following defines. */ ++#define MUSL_DYNAMIC_LINKER "invalid" ++#define MUSL_DYNAMIC_LINKER32 "invalid" ++#define MUSL_DYNAMIC_LINKER64 "invalid" ++#define MUSL_DYNAMIC_LINKERX32 "invalid" ++ + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKER32) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +Index: b/gcc/config/microblaze/linux.h +=================================================================== +--- a/gcc/config/microblaze/linux.h ++++ b/gcc/config/microblaze/linux.h +@@ -25,7 +25,23 @@ + #undef TLS_NEEDS_GOT + #define TLS_NEEDS_GOT 1 + +-#define DYNAMIC_LINKER "/lib/ld.so.1" ++#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER ++#else ++#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER ++#endif ++ ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "dynamic_linker", DYNAMIC_LINKER } +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -375,17 +375,23 @@ + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +Index: b/gcc/config/rs6000/secureplt.h +=================================================================== +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +Index: b/gcc/config/rs6000/sysv4.h +=================================================================== +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #define CC1_SPEC "%{G*} %(cc1_cpu)" \ +@@ -585,7 +588,8 @@ + + /* Override the default target of the linker. */ + #define LINK_TARGET_SPEC \ +- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") ++ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ ++ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Any specific OS flags. */ + #define LINK_OS_SPEC "\ +@@ -763,15 +767,18 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -894,6 +901,7 @@ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +Index: b/gcc/config/sh/linux.h +=================================================================== +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,7 +43,15 @@ + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ ++#define MUSL_DYNAMIC_LINKER_E "eb" ++#else ++#define MUSL_DYNAMIC_LINKER_E ++#endif ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -27449,6 +27453,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5108,6 +5112,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/ginclude/stddef.h +=================================================================== +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -181,6 +181,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -197,6 +198,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -214,6 +216,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -73,6 +73,13 @@ + && defined(TARGET_DL_ITERATE_PHDR) \ + && defined(__sun__) && defined(__svr4__) + # define USE_PT_GNU_EH_FRAME ++ #endif ++ ++/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure ++ script. */ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) ++# define USE_PT_GNU_EH_FRAME + #endif + + #if defined(USE_PT_GNU_EH_FRAME) +Index: b/libgomp/config/posix/time.c +=================================================================== +--- a/libgomp/config/posix/time.c ++++ b/libgomp/config/posix/time.c +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -264,6 +264,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -272,6 +279,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; +Index: b/gcc/config/mips/linux64.h +=================================================================== +--- a/gcc/config/mips/linux64.h ++++ b/gcc/config/mips/linux64.h +@@ -41,4 +41,4 @@ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER) +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -23,3 +23,11 @@ + #undef UCLIBC_DYNAMIC_LINKER + #define UCLIBC_DYNAMIC_LINKER \ + "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" diff --git a/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch b/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch new file mode 100644 index 0000000..df5372b --- /dev/null +++ b/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch @@ -0,0 +1,12 @@ +Upstream status: In progress + +--- a/libgcc/config/nios2/linux-atomic.c ++++ b/libgcc/config/nios2/linux-atomic.c +@@ -20,7 +20,6 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +-#include + #define EFAULT 14 + #define EBUSY 16 + #define ENOSYS 38 diff --git a/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000..670cf8d --- /dev/null +++ b/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,14 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.9.3.orig/libgcc/config/t-stack gcc-4.9.3/libgcc/config/t-stack +--- gcc-4.9.3.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-4.9.3/libgcc/config/t-stack 2016-03-07 01:34:32.000000000 +0100 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index d204bf7..08a7272 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -36,6 +36,32 @@ choice depends on BR2_arc select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + config BR2_GCC_VERSION_4_9_1 + bool "gcc 4.9.1" + # Broken or unsupported architectures + depends on !BR2_arc + # Broken or unsupported ARM cores + depends on !BR2_cortex_a17 + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102 + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + + config BR2_GCC_VERSION_4_9_3 + bool "gcc 4.9.3" + # Broken or unsupported architectures + depends on !BR2_arc + # Broken or unsupported ARM cores + depends on !BR2_cortex_a17 + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102 + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + config BR2_GCC_VERSION_4_9_X bool "gcc 4.9.x" # Broken or unsupported architectures @@ -93,6 +119,8 @@ config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE config BR2_GCC_VERSION string default "4.8.5" if BR2_GCC_VERSION_4_8_X + default "4.9.1" if BR2_GCC_VERSION_4_9_1 + default "4.9.3" if BR2_GCC_VERSION_4_9_3 default "4.9.4" if BR2_GCC_VERSION_4_9_X default "5.4.0" if BR2_GCC_VERSION_5_X default "6.2.0" if BR2_GCC_VERSION_6_X diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash index ce738ef..581bceb 100644 --- a/package/gcc/gcc.hash +++ b/package/gcc/gcc.hash @@ -4,6 +4,10 @@ sha512 78696b287d46aacd6f150920da376ea32f58ad9f0dafd2d3b7fa6dbdd8dd7afe659108d1 sha512 dfcb737073191e628231031a3571ec77ee760a59377630f4a6e4fdfa66f9ddad39fde47e3f0f227eb43cdf90e0d34cde5abdc9ac892c1e111a911062a66c9189 gcc-4.7.4.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.5/sha512.sum sha512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea gcc-4.8.5.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.1/sha512.sum +sha512 8598106a4b7c03bb4d6e29fa1bfa9ee6b6390d1f1bca86c1ccd27aed830ae1d126daa50c4041016cbfa76090dd66c51f1ce06958b8ccd6c3be51eae875125593 gcc-4.9.1.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/sha512.sum +sha512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df gcc-4.9.3.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.4/sha512.sum sha512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe gcc-4.9.4.tar.bz2 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.4.0/sha512.sum diff --git a/package/glibc/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch b/package/glibc/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch new file mode 100644 index 0000000..da2f49d --- /dev/null +++ b/package/glibc/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch @@ -0,0 +1,174 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1157689 +Modified for eglibc. + +Signed-off-by: Gustavo Zacarias + +WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! +EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!! +SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! + +CVE-2014-7817: + +The function wordexp() fails to properly handle the WRDE_NOCMD +flag when processing arithmetic inputs in the form of "$((... ``))" +where "..." can be anything valid. The backticks in the arithmetic +epxression are evaluated by in a shell even if WRDE_NOCMD forbade +command substitution. This allows an attacker to attempt to pass +dangerous commands via constructs of the above form, and bypass +the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD +in parse_arith(). The patch also hardens parse_backticks() and +parse_comm() to check for WRDE_NOCMD flag and return an error instead +of ever running a shell. + +We expand the testsuite and add 3 new regression tests of roughtly +the same form but with a couple of nested levels. + +On top of the 3 new tests we add fork validation to the WRDE_NOCMD +testing. If any forks are detected during the execution of a wordexp() +call with WRDE_NOCMD, the test is marked as failed. This is slightly +heuristic since vfork might be used, but it provides a higher level +of assurance that no shells were executed as part of command substitution +with WRDE_NOCMD in effect. In addition it doesn't require libpthread or +libdl, instead we use the public implementation namespace function +__register_atfork (already part of the public ABI for libpthread). + +Tested on x86_64 with no regressions. + +2014-10-27 Carlos O'Donell + + * wordexp-test.c (__dso_handle): Add prototype. + (__register_atfork): Likewise. + (__app_register_atfork): New function. + (registered_forks): New global. + (register_fork): New function. + (test_case): Add 3 new tests for WRDE_CMDSUB. + (main): Call __app_register_atfork. + (testit): If WRDE_NOCMD set registered_forks to zero, run test, and + if fork count is non-zero fail the test. + * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag + is set and parsing '`'. + (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set. + (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and + parsing '`'. + +diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c +index 4957006..5ce2a1b 100644 +--- a/libc/posix/wordexp-test.c ++++ b/libc/posix/wordexp-test.c +@@ -27,6 +27,25 @@ + + #define IFS " \n\t" + ++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); ++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); ++ ++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) ++{ ++ return __register_atfork (prepare, parent, child, ++ &__dso_handle == NULL ? NULL : __dso_handle); ++} ++ ++/* Number of forks seen. */ ++static int registered_forks; ++ ++/* For each fork increment the fork count. */ ++static void ++register_fork (void) ++{ ++ registered_forks++; ++} ++ + struct test_case_struct + { + int retval; +@@ -206,6 +225,12 @@ struct test_case_struct + { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, ++ /* Test for CVE-2014-7817. We test 3 combinations of command ++ substitution inside an arithmetic expression to make sure that ++ no commands are executed and error is returned. */ ++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, + + { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, + }; +@@ -258,6 +283,15 @@ main (int argc, char *argv[]) + return -1; + } + ++ /* If we are not allowed to do command substitution, we install ++ fork handlers to verify that no forks happened. No forks should ++ happen at all if command substitution is disabled. */ ++ if (__app_register_atfork (register_fork, NULL, NULL) != 0) ++ { ++ printf ("Failed to register fork handler.\n"); ++ return -1; ++ } ++ + for (test = 0; test_case[test].retval != -1; test++) + if (testit (&test_case[test])) + ++fail; +@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) + + printf ("Test %d (%s): ", ++tests, tc->words); + ++ if (tc->flags & WRDE_NOCMD) ++ registered_forks = 0; ++ + if (tc->flags & WRDE_APPEND) + { + /* initial wordexp() call, to be appended to */ +@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) + } + retval = wordexp (tc->words, &we, tc->flags); + ++ if ((tc->flags & WRDE_NOCMD) ++ && (registered_forks > 0)) ++ { ++ printf ("FAILED fork called for WRDE_NOCMD\n"); ++ return 1; ++ } ++ + if (tc->flags & WRDE_DOOFFS) + start_offs = sav_we.we_offs; + +diff --git a/posix/wordexp.c b/posix/wordexp.c +index b6b65dd..d6a158f 100644 +--- a/libc/posix/wordexp.c ++++ b/libc/posix/wordexp.c +@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length, + break; + + case '`': ++ if (flags & WRDE_NOCMD) ++ { ++ free (expr); ++ return WRDE_NOCMD; ++ } ++ + (*offset)++; + error = parse_backtick (&expr, &expr_length, &expr_maxlen, + words, offset, flags, NULL, NULL, NULL); +@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, + size_t comm_maxlen; + char *comm = w_newword (&comm_length, &comm_maxlen); + ++ /* Do nothing if command substitution should not succeed. */ ++ if (flags & WRDE_NOCMD) ++ return WRDE_CMDSUB; ++ + for (; words[*offset]; ++(*offset)) + { + switch (words[*offset]) +@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length, + switch (words[*offset]) + { + case '`': ++ if (flags & WRDE_NOCMD) ++ return WRDE_NOCMD; ++ + /* Go -- give the script to the shell */ + error = exec_comm (comm, word, word_length, max_length, flags, + pwordexp, ifs, ifs_white); diff --git a/package/glibc/glibc/2.18-svnr23787/0002-accept-make4.patch b/package/glibc/glibc/2.18-svnr23787/0002-accept-make4.patch new file mode 100644 index 0000000..4f426f2 --- /dev/null +++ b/package/glibc/glibc/2.18-svnr23787/0002-accept-make4.patch @@ -0,0 +1,33 @@ +Backport upstream patch (28d708c44bc47b56f6551ff285f78edcf61c208a) to accept +make-4.0 or newer. +We patch both configure and configure.in files so if we ever have to run +autoreconf in the glibc source, then the fix will be propagated properly. + +Signed-off-by: Markos Chandras + +Index: glibc-2.18-svnr23787/libc/configure +=================================================================== +--- glibc-2.18-svnr23787.orig/libc/configure ++++ glibc-2.18-svnr23787/libc/configure +@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +Index: glibc-2.18-svnr23787/libc/configure.in +=================================================================== +--- glibc-2.18-svnr23787.orig/libc/configure.in ++++ glibc-2.18-svnr23787/libc/configure.in +@@ -989,7 +989,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}g + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/package/glibc/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch b/package/glibc/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch new file mode 100644 index 0000000..f447dcd --- /dev/null +++ b/package/glibc/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch @@ -0,0 +1,141 @@ +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6 +See https://bugzilla.redhat.com/show_bug.cgi?id=1135841 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c +--- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300 +@@ -220,7 +220,8 @@ + ++rp2; \ + \ + uint32_t res; \ +- if (__builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ ++ || __builtin_expect (ch < rp2->start, 0) \ + || (res = DB_TO_UCS4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c +--- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300 +@@ -73,11 +73,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm932db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c +--- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm933db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c +--- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm935db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c +--- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm937db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c +--- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm939db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c +--- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300 +@@ -74,11 +74,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm943db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile +--- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300 ++++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300 +@@ -303,6 +303,7 @@ + $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) \ + $(common-objdir)/iconv/iconv_prog TESTS ++ iconv_modules="$(modules)" \ + $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@ + + $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh +--- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300 ++++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300 +@@ -188,6 +188,24 @@ + + done < TESTS2 + ++# Check for crashes in decoders. ++printf '\016\377\377\377\377\377\377\377' > $temp1 ++for from in $iconv_modules ; do ++ echo $ac_n "test decoder $from $ac_c" ++ PROG=`eval echo $ICONV` ++ if $PROG < $temp1 >/dev/null 2>&1 ; then ++ : # fall through ++ else ++ status=$? ++ if test $status -gt 1 ; then ++ echo "/FAILED" ++ failed=1 ++ continue ++ fi ++ fi ++ echo "OK" ++done ++ + exit $failed + # Local Variables: + # mode:shell-script diff --git a/package/glibc/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch b/package/glibc/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch new file mode 100644 index 0000000..c7aa12c --- /dev/null +++ b/package/glibc/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch @@ -0,0 +1,20 @@ +Fix CVE-2014-9402 - denial of service in getnetbyname function. +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d +See https://bugzilla.redhat.com/show_bug.cgi?id=1175369 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c +--- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300 ++++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300 +@@ -398,8 +398,8 @@ + + case BYNAME: + { +- char **ap = result->n_aliases++; +- while (*ap != NULL) ++ char **ap; ++ for (ap = result->n_aliases; *ap != NULL; ++ap) + { + /* Check each alias name for being of the forms: + 4.3.2.1.in-addr.arpa = net 1.2.3.4 diff --git a/package/glibc/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch b/package/glibc/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch new file mode 100644 index 0000000..a0da626 --- /dev/null +++ b/package/glibc/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch @@ -0,0 +1,88 @@ +Fix CVE-2015-1472 - heap buffer overflow in wscanf +Backport from upstream: +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06 +See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235 + +Signed-off-by: Gustavo Zacarias + +diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c +index aece3f2..8a2eb9e 100644 +--- a/libc/stdio-common/tst-sscanf.c ++++ b/libc/stdio-common/tst-sscanf.c +@@ -233,5 +233,38 @@ main (void) + } + } + ++ /* BZ #16618 ++ The test will segfault during SSCANF if the buffer overflow ++ is not fixed. The size of `s` is such that it forces the use ++ of malloc internally and this triggers the incorrect computation. ++ Thus the value for SIZE is arbitrariy high enough that malloc ++ is used. */ ++ { ++#define SIZE 131072 ++ CHAR *s = malloc ((SIZE + 1) * sizeof (*s)); ++ if (s == NULL) ++ abort (); ++ for (size_t i = 0; i < SIZE; i++) ++ s[i] = L('0'); ++ s[SIZE] = L('\0'); ++ int i = 42; ++ /* Scan multi-digit zero into `i`. */ ++ if (SSCANF (s, L("%d"), &i) != 1) ++ { ++ printf ("FAIL: bug16618: SSCANF did not read one input item.\n"); ++ result = 1; ++ } ++ if (i != 0) ++ { ++ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n"); ++ result = 1; ++ } ++ free (s); ++ if (result != 1) ++ printf ("PASS: bug16618: Did not crash.\n"); ++#undef SIZE ++ } ++ ++ + return result; + } +diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c +index cd129a8..0e204e7 100644 +--- a/libc/stdio-common/vfscanf.c ++++ b/libc/stdio-common/vfscanf.c +@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + if (__glibc_unlikely (wpsize == wpmax)) \ + { \ + CHAR_T *old = wp; \ +- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \ +- ? UCHAR_MAX + 1 : 2 * wpmax); \ +- if (use_malloc || !__libc_use_alloca (newsize)) \ ++ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \ ++ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \ ++ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \ ++ if (!__libc_use_alloca (newsize)) \ + { \ + wp = realloc (use_malloc ? wp : NULL, newsize); \ + if (wp == NULL) \ +@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + } \ + if (! use_malloc) \ + MEMCPY (wp, old, wpsize); \ +- wpmax = newsize; \ ++ wpmax = wpneed; \ + use_malloc = true; \ + } \ + else \ + { \ + size_t s = wpmax * sizeof (CHAR_T); \ +- wp = (CHAR_T *) extend_alloca (wp, s, \ +- newsize * sizeof (CHAR_T)); \ ++ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \ + wpmax = s / sizeof (CHAR_T); \ + if (old != NULL) \ + MEMCPY (wp, old, wpsize); \ +-- +1.9.4 + diff --git a/package/glibc/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch b/package/glibc/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch new file mode 100644 index 0000000..da2f49d --- /dev/null +++ b/package/glibc/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch @@ -0,0 +1,174 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1157689 +Modified for eglibc. + +Signed-off-by: Gustavo Zacarias + +WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! +EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!! +SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! + +CVE-2014-7817: + +The function wordexp() fails to properly handle the WRDE_NOCMD +flag when processing arithmetic inputs in the form of "$((... ``))" +where "..." can be anything valid. The backticks in the arithmetic +epxression are evaluated by in a shell even if WRDE_NOCMD forbade +command substitution. This allows an attacker to attempt to pass +dangerous commands via constructs of the above form, and bypass +the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD +in parse_arith(). The patch also hardens parse_backticks() and +parse_comm() to check for WRDE_NOCMD flag and return an error instead +of ever running a shell. + +We expand the testsuite and add 3 new regression tests of roughtly +the same form but with a couple of nested levels. + +On top of the 3 new tests we add fork validation to the WRDE_NOCMD +testing. If any forks are detected during the execution of a wordexp() +call with WRDE_NOCMD, the test is marked as failed. This is slightly +heuristic since vfork might be used, but it provides a higher level +of assurance that no shells were executed as part of command substitution +with WRDE_NOCMD in effect. In addition it doesn't require libpthread or +libdl, instead we use the public implementation namespace function +__register_atfork (already part of the public ABI for libpthread). + +Tested on x86_64 with no regressions. + +2014-10-27 Carlos O'Donell + + * wordexp-test.c (__dso_handle): Add prototype. + (__register_atfork): Likewise. + (__app_register_atfork): New function. + (registered_forks): New global. + (register_fork): New function. + (test_case): Add 3 new tests for WRDE_CMDSUB. + (main): Call __app_register_atfork. + (testit): If WRDE_NOCMD set registered_forks to zero, run test, and + if fork count is non-zero fail the test. + * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag + is set and parsing '`'. + (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set. + (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and + parsing '`'. + +diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c +index 4957006..5ce2a1b 100644 +--- a/libc/posix/wordexp-test.c ++++ b/libc/posix/wordexp-test.c +@@ -27,6 +27,25 @@ + + #define IFS " \n\t" + ++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); ++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); ++ ++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) ++{ ++ return __register_atfork (prepare, parent, child, ++ &__dso_handle == NULL ? NULL : __dso_handle); ++} ++ ++/* Number of forks seen. */ ++static int registered_forks; ++ ++/* For each fork increment the fork count. */ ++static void ++register_fork (void) ++{ ++ registered_forks++; ++} ++ + struct test_case_struct + { + int retval; +@@ -206,6 +225,12 @@ struct test_case_struct + { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, ++ /* Test for CVE-2014-7817. We test 3 combinations of command ++ substitution inside an arithmetic expression to make sure that ++ no commands are executed and error is returned. */ ++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, + + { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, + }; +@@ -258,6 +283,15 @@ main (int argc, char *argv[]) + return -1; + } + ++ /* If we are not allowed to do command substitution, we install ++ fork handlers to verify that no forks happened. No forks should ++ happen at all if command substitution is disabled. */ ++ if (__app_register_atfork (register_fork, NULL, NULL) != 0) ++ { ++ printf ("Failed to register fork handler.\n"); ++ return -1; ++ } ++ + for (test = 0; test_case[test].retval != -1; test++) + if (testit (&test_case[test])) + ++fail; +@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) + + printf ("Test %d (%s): ", ++tests, tc->words); + ++ if (tc->flags & WRDE_NOCMD) ++ registered_forks = 0; ++ + if (tc->flags & WRDE_APPEND) + { + /* initial wordexp() call, to be appended to */ +@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) + } + retval = wordexp (tc->words, &we, tc->flags); + ++ if ((tc->flags & WRDE_NOCMD) ++ && (registered_forks > 0)) ++ { ++ printf ("FAILED fork called for WRDE_NOCMD\n"); ++ return 1; ++ } ++ + if (tc->flags & WRDE_DOOFFS) + start_offs = sav_we.we_offs; + +diff --git a/posix/wordexp.c b/posix/wordexp.c +index b6b65dd..d6a158f 100644 +--- a/libc/posix/wordexp.c ++++ b/libc/posix/wordexp.c +@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length, + break; + + case '`': ++ if (flags & WRDE_NOCMD) ++ { ++ free (expr); ++ return WRDE_NOCMD; ++ } ++ + (*offset)++; + error = parse_backtick (&expr, &expr_length, &expr_maxlen, + words, offset, flags, NULL, NULL, NULL); +@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, + size_t comm_maxlen; + char *comm = w_newword (&comm_length, &comm_maxlen); + ++ /* Do nothing if command substitution should not succeed. */ ++ if (flags & WRDE_NOCMD) ++ return WRDE_CMDSUB; ++ + for (; words[*offset]; ++(*offset)) + { + switch (words[*offset]) +@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length, + switch (words[*offset]) + { + case '`': ++ if (flags & WRDE_NOCMD) ++ return WRDE_NOCMD; ++ + /* Go -- give the script to the shell */ + error = exec_comm (comm, word, word_length, max_length, flags, + pwordexp, ifs, ifs_white); diff --git a/package/glibc/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch b/package/glibc/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch new file mode 100644 index 0000000..f447dcd --- /dev/null +++ b/package/glibc/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch @@ -0,0 +1,141 @@ +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6 +See https://bugzilla.redhat.com/show_bug.cgi?id=1135841 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c +--- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300 +@@ -220,7 +220,8 @@ + ++rp2; \ + \ + uint32_t res; \ +- if (__builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ ++ || __builtin_expect (ch < rp2->start, 0) \ + || (res = DB_TO_UCS4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c +--- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300 +@@ -73,11 +73,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm932db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c +--- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm933db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c +--- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm935db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c +--- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm937db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c +--- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm939db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c +--- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300 +@@ -74,11 +74,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm943db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile +--- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300 ++++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300 +@@ -303,6 +303,7 @@ + $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) \ + $(common-objdir)/iconv/iconv_prog TESTS ++ iconv_modules="$(modules)" \ + $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@ + + $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh +--- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300 ++++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300 +@@ -188,6 +188,24 @@ + + done < TESTS2 + ++# Check for crashes in decoders. ++printf '\016\377\377\377\377\377\377\377' > $temp1 ++for from in $iconv_modules ; do ++ echo $ac_n "test decoder $from $ac_c" ++ PROG=`eval echo $ICONV` ++ if $PROG < $temp1 >/dev/null 2>&1 ; then ++ : # fall through ++ else ++ status=$? ++ if test $status -gt 1 ; then ++ echo "/FAILED" ++ failed=1 ++ continue ++ fi ++ fi ++ echo "OK" ++done ++ + exit $failed + # Local Variables: + # mode:shell-script diff --git a/package/glibc/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch b/package/glibc/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch new file mode 100644 index 0000000..c7aa12c --- /dev/null +++ b/package/glibc/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch @@ -0,0 +1,20 @@ +Fix CVE-2014-9402 - denial of service in getnetbyname function. +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d +See https://bugzilla.redhat.com/show_bug.cgi?id=1175369 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c +--- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300 ++++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300 +@@ -398,8 +398,8 @@ + + case BYNAME: + { +- char **ap = result->n_aliases++; +- while (*ap != NULL) ++ char **ap; ++ for (ap = result->n_aliases; *ap != NULL; ++ap) + { + /* Check each alias name for being of the forms: + 4.3.2.1.in-addr.arpa = net 1.2.3.4 diff --git a/package/glibc/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch b/package/glibc/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch new file mode 100644 index 0000000..a0da626 --- /dev/null +++ b/package/glibc/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch @@ -0,0 +1,88 @@ +Fix CVE-2015-1472 - heap buffer overflow in wscanf +Backport from upstream: +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06 +See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235 + +Signed-off-by: Gustavo Zacarias + +diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c +index aece3f2..8a2eb9e 100644 +--- a/libc/stdio-common/tst-sscanf.c ++++ b/libc/stdio-common/tst-sscanf.c +@@ -233,5 +233,38 @@ main (void) + } + } + ++ /* BZ #16618 ++ The test will segfault during SSCANF if the buffer overflow ++ is not fixed. The size of `s` is such that it forces the use ++ of malloc internally and this triggers the incorrect computation. ++ Thus the value for SIZE is arbitrariy high enough that malloc ++ is used. */ ++ { ++#define SIZE 131072 ++ CHAR *s = malloc ((SIZE + 1) * sizeof (*s)); ++ if (s == NULL) ++ abort (); ++ for (size_t i = 0; i < SIZE; i++) ++ s[i] = L('0'); ++ s[SIZE] = L('\0'); ++ int i = 42; ++ /* Scan multi-digit zero into `i`. */ ++ if (SSCANF (s, L("%d"), &i) != 1) ++ { ++ printf ("FAIL: bug16618: SSCANF did not read one input item.\n"); ++ result = 1; ++ } ++ if (i != 0) ++ { ++ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n"); ++ result = 1; ++ } ++ free (s); ++ if (result != 1) ++ printf ("PASS: bug16618: Did not crash.\n"); ++#undef SIZE ++ } ++ ++ + return result; + } +diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c +index cd129a8..0e204e7 100644 +--- a/libc/stdio-common/vfscanf.c ++++ b/libc/stdio-common/vfscanf.c +@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + if (__glibc_unlikely (wpsize == wpmax)) \ + { \ + CHAR_T *old = wp; \ +- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \ +- ? UCHAR_MAX + 1 : 2 * wpmax); \ +- if (use_malloc || !__libc_use_alloca (newsize)) \ ++ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \ ++ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \ ++ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \ ++ if (!__libc_use_alloca (newsize)) \ + { \ + wp = realloc (use_malloc ? wp : NULL, newsize); \ + if (wp == NULL) \ +@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + } \ + if (! use_malloc) \ + MEMCPY (wp, old, wpsize); \ +- wpmax = newsize; \ ++ wpmax = wpneed; \ + use_malloc = true; \ + } \ + else \ + { \ + size_t s = wpmax * sizeof (CHAR_T); \ +- wp = (CHAR_T *) extend_alloca (wp, s, \ +- newsize * sizeof (CHAR_T)); \ ++ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \ + wpmax = s / sizeof (CHAR_T); \ + if (old != NULL) \ + MEMCPY (wp, old, wpsize); \ +-- +1.9.4 + diff --git a/package/glibc/glibc/2.22/0001-fix-CVE-2015-7547.patch b/package/glibc/glibc/2.22/0001-fix-CVE-2015-7547.patch new file mode 100644 index 0000000..19b8b6e --- /dev/null +++ b/package/glibc/glibc/2.22/0001-fix-CVE-2015-7547.patch @@ -0,0 +1,236 @@ +Fetched from gentoo glibc patchball +Original patch filename: 10_all_glibc-CVE-2015-7547.patch +Based on: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html + +Fixes: +CVE-2015-7547 - glibc getaddrinfo stack-based buffer overflow. + +Signed-off-by: Gustavo Zacarias + +--- a/resolv/nss_dns/dns-host.c ++++ b/resolv/nss_dns/dns-host.c +@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname, + int h_namelen = 0; + + if (ancount == 0) +- return NSS_STATUS_NOTFOUND; ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } + + while (ancount-- > 0 && cp < end_of_message && had_error == 0) + { +@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname, + /* Special case here: if the resolver sent a result but it only + contains a CNAME while we are looking for a T_A or T_AAAA record, + we fail with NOTFOUND instead of TRYAGAIN. */ +- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; ++ if (canon != NULL) ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } ++ ++ *h_errnop = NETDB_INTERNAL; ++ return NSS_STATUS_TRYAGAIN; + } + + +@@ -1242,8 +1252,15 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2, + &pat, &buffer, &buflen, + errnop, h_errnop, ttlp, + &first); ++ /* Use the second response status in some cases. */ + if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) + status = status2; ++ /* Do not return a truncated second response (unless it was ++ unavoidable e.g. unrecoverable TRYAGAIN). */ ++ if (status == NSS_STATUS_SUCCESS ++ && (status2 == NSS_STATUS_TRYAGAIN ++ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) ++ status = NSS_STATUS_TRYAGAIN; + } + + return status; +--- a/resolv/res_query.c ++++ b/resolv/res_query.c +@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + } +@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + +@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + if (saved_herrno != -1) +--- a/resolv/res_send.c ++++ b/resolv/res_send.c +@@ -639,11 +639,7 @@ send_vc(res_state statp, + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; +- // XXX REMOVE +- // int anssiz = *anssizp; +- HEADER *anhp = (HEADER *) ans; ++ HEADER *anhp = (HEADER *) *ansp; + struct sockaddr *nsap = get_nsaddr (statp, ns); + int truncating, connreset, n; + /* On some architectures compiler might emit a warning indicating +@@ -767,35 +763,6 @@ send_vc(res_state statp, + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if __GNUC_PREREQ (4, 7) +- DIAG_PUSH_NEEDS_COMMENT; +- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); +-#endif +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +-#if __GNUC_PREREQ (4, 7) +- DIAG_POP_NEEDS_COMMENT; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; +@@ -804,10 +771,14 @@ send_vc(res_state statp, + anhp = (HEADER *) *thisansp; + + *thisresplenp = rlen; +- if (rlen > *thisanssizp) { +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- if (__glibc_likely (anscp != NULL)) { ++ /* Is the answer buffer too small? */ ++ if (*thisanssizp < rlen) { ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ if (thisansp != NULL && thisansp != ansp) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp == NULL) { + *terrno = ENOMEM; +@@ -957,8 +928,6 @@ send_dg(res_state statp, + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; + struct timespec now, timeout, finish; + struct pollfd pfd[1]; + int ptimeout; +@@ -1154,50 +1123,48 @@ send_dg(res_state statp, + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; + } + + if (*thisanssizp < MAXPACKET +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- && anscp ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ && (thisansp != NULL && thisansp != ansp) + #ifdef FIONREAD ++ /* Is the size too small? */ + && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 + || *thisanssizp < *thisresplenp) + #endif + ) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp != NULL) { +- *anssizp = MAXPACKET; +- *thisansp = ans = newp; ++ *thisanssizp = MAXPACKET; ++ *thisansp = newp; + if (thisansp == ansp2) + *ansp2_malloced = 1; + } + } ++ /* We could end up with truncation if anscp was NULL ++ (not allowed to change caller's buffer) and the ++ response buffer size is too small. This isn't a ++ reliable way to detect truncation because the ioctl ++ may be an inaccurate report of the UDP message size. ++ Therefore we use this only to issue debug output. ++ To do truncation accurately with UDP we need ++ MSG_TRUNC which is only available on Linux. We ++ can abstract out the Linux-specific feature in the ++ future to detect truncation. */ ++ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { ++ Dprint(statp->options & RES_DEBUG, ++ (stdout, ";; response may be truncated (UDP)\n") ++ ); ++ } ++ + HEADER *anhp = (HEADER *) *thisansp; + socklen_t fromlen = sizeof(struct sockaddr_in6); + assert (sizeof(from) <= fromlen); diff --git a/package/glibc/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch b/package/glibc/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch new file mode 100644 index 0000000..28f4b6e --- /dev/null +++ b/package/glibc/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch @@ -0,0 +1,43 @@ +From 8415fb8d4f05c023b9d79e44dff197cc285fd1e5 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Thu, 6 Aug 2015 02:10:46 -0400 +Subject: [PATCH] microblaze: include unix/sysdep.h + +The semi-recent SYSCALL_CANCEL inclusion broke microblaze due to the +sysdep.h header not including the unix/sysdep.h header. Include it +here like all other ports. + +(cherry picked from commit 5d5de49c3ccd69f65b801f1ca490a0112d1cbd7d) + +Signed-off-by: Thomas Petazzoni +[edited to remove ChangeLog modifications, which cause conflicts.] +--- + sysdeps/unix/sysv/linux/microblaze/sysdep.h | 7 ++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h +index 83c0340..9d5c542 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h ++++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h +@@ -16,8 +16,11 @@ + License along with the GNU C Library; if not, see + . */ + ++#ifndef _LINUX_MICROBLAZE_SYSDEP_H ++#define _LINUX_MICROBLAZE_SYSDEP_H 1 ++ ++#include + #include +-#include + + /* Defines RTLD_PRIVATE_ERRNO. */ + #include +@@ -305,3 +308,5 @@ SYSCALL_ERROR_LABEL_DCL: \ + # define PTR_DEMANGLE(var) (void) (var) + + #endif /* not __ASSEMBLER__ */ ++ ++#endif /* _LINUX_MICROBLAZE_SYSDEP_H */ +-- +2.6.4 + diff --git a/package/glibc/glibc/Config.in b/package/glibc/glibc/Config.in new file mode 100644 index 0000000..0565162 --- /dev/null +++ b/package/glibc/glibc/Config.in @@ -0,0 +1,56 @@ +if BR2_TOOLCHAIN_BUILDROOT_EGLIBC + +config BR2_PACKAGE_EGLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + +choice + prompt "eglibc version" + default BR2_EGLIBC_VERSION_2_18 + +config BR2_EGLIBC_VERSION_2_18 + bool "2.18-svnr23787" + # Build breakage + depends on !BR2_sparc + +config BR2_EGLIBC_VERSION_2_19 + bool "2.19-svnr25243" + # Build breakage + depends on !BR2_powerpc_SPE + +endchoice + +endif + +if BR2_TOOLCHAIN_BUILDROOT_GLIBC + +config BR2_PACKAGE_GLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + +choice + prompt "glibc version" + default BR2_GLIBC_VERSION_2_22 + +config BR2_GLIBC_VERSION_2_22 + bool "2.22" + # No support for pthread barriers on < v9 ISA + depends on !BR2_sparc + +config BR2_GLIBC_VERSION_2_23 + bool "2.23" + # No support for pthread barriers on < v9 ISA + depends on !BR2_sparc + +endchoice + +endif + +config BR2_GLIBC_VERSION_STRING + string + default "2.18-svnr23787" if BR2_EGLIBC_VERSION_2_18 + default "2.19-svnr25243" if BR2_EGLIBC_VERSION_2_19 + default "2.22" if BR2_GLIBC_VERSION_2_22 + default "2.23" if BR2_GLIBC_VERSION_2_23 diff --git a/package/glibc/glibc/glibc.hash b/package/glibc/glibc/glibc.hash new file mode 100644 index 0000000..b04f214 --- /dev/null +++ b/package/glibc/glibc/glibc.hash @@ -0,0 +1,8 @@ +# Locally calculated after checking pgp signature (glibc) +# http://downloads.yoctoproject.org/releases/eglibc/*.{md5,sha1} (eglibc) +md5 b395b021422a027d89884992e91734fc eglibc-2.18-svnr23787.tar.bz2 +sha1 224d9e655e8f0ad04ffde47b97a11c64e2255b56 eglibc-2.18-svnr23787.tar.bz2 +md5 197836c2ba42fb146e971222647198dd eglibc-2.19-svnr25243.tar.bz2 +sha1 8013c1935b46fd50d2d1fbfad3b0af362b75fb28 eglibc-2.19-svnr25243.tar.bz2 +sha256 eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948 glibc-2.22.tar.xz +sha256 94efeb00e4603c8546209cefb3e1a50a5315c86fa9b078b6fad758e187ce13e9 glibc-2.23.tar.xz diff --git a/package/glibc/glibc/glibc.mk b/package/glibc/glibc/glibc.mk new file mode 100644 index 0000000..4a9ba0e --- /dev/null +++ b/package/glibc/glibc/glibc.mk @@ -0,0 +1,155 @@ +################################################################################ +# +# glibc/eglibc +# +################################################################################ + +GLIBC_VERSION = $(call qstrip,$(BR2_GLIBC_VERSION_STRING)) + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y) +GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc +GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2 +GLIBC_SRC_SUBDIR = libc +else +GLIBC_SITE = $(BR2_GNU_MIRROR)/libc +GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +GLIBC_SRC_SUBDIR = . +endif + +GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library) +GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES) + +# glibc is part of the toolchain so disable the toolchain dependency +GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + +# Before (e)glibc is configured, we must have the first stage +# cross-compiler and the kernel headers +GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk + +GLIBC_SUBDIR = build + +GLIBC_INSTALL_STAGING = YES + +GLIBC_INSTALL_STAGING_OPTS = install_root=$(STAGING_DIR) install + +# Thumb build is broken, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +GLIBC_EXTRA_CFLAGS += -marm +endif + +# MIPS64 defaults to n32 so pass the correct -mabi if +# we are using a different ABI. OABI32 is also used +# in MIPS so we pass -mabi=32 in this case as well +# even though it's not strictly necessary. +ifeq ($(BR2_MIPS_NABI64),y) +GLIBC_EXTRA_CFLAGS += -mabi=64 +else ifeq ($(BR2_MIPS_OABI32),y) +GLIBC_EXTRA_CFLAGS += -mabi=32 +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +GLIBC_EXTRA_CFLAGS += -g +endif + +# The stubs.h header is not installed by install-headers, but is +# needed for the gcc build. An empty stubs.h will work, as explained +# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick +# is used by Crosstool-NG. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_GLIBC),y) +define GLIBC_ADD_MISSING_STUB_H + mkdir -p $(STAGING_DIR)/usr/include/gnu + touch $(STAGING_DIR)/usr/include/gnu/stubs.h +endef +endif + +# Even though we use the autotools-package infrastructure, we have to +# override the default configure commands for several reasons: +# +# 1. We have to build out-of-tree, but we can't use the same +# 'symbolic link to configure' used with the gcc packages. +# +# 2. We have to execute the configure script with bash and not sh. +# +# Note that as mentionned in +# http://patches.openembedded.org/patch/38849/, eglibc/glibc must be +# built with -O2, so we pass our own CFLAGS and CXXFLAGS below. +define GLIBC_CONFIGURE_CMDS + mkdir -p $(@D)/build + # Do the configuration + (cd $(@D)/build; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \ + CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \ + $(SHELL) $(@D)/$(GLIBC_SRC_SUBDIR)/configure \ + ac_cv_path_BASH_SHELL=/bin/bash \ + libc_cv_forced_unwind=yes \ + libc_cv_ssp=no \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --enable-shared \ + $(if $(BR2_SOFT_FLOAT),--without-fp,--with-fp) \ + $(if $(BR2_x86_64),--enable-lock-elision) \ + --with-pkgversion="Buildroot" \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --enable-obsolete-rpc \ + --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \ + --with-headers=$(STAGING_DIR)/usr/include) + $(GLIBC_ADD_MISSING_STUB_H) +endef + + +# +# We also override the install to target commands since we only want +# to install the libraries, and nothing more. +# + +GLIBC_LIBS_LIB = \ + ld*.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* \ + libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* libutil.so.* \ + libnss_files.so.* libnss_dns.so.* + +ifeq ($(BR2_PACKAGE_GDB),y) +GLIBC_LIBS_LIB += libthread_db.so.* +endif + +define GLIBC_INSTALL_TARGET_CMDS + for libs in $(GLIBC_LIBS_LIB); do \ + $(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \ + done +endef + +# MIPS R6 requires to have NaN2008 support which is currently not +# supported by the Linux kernel. In order to prevent building the +# glibc against kernels not having NaN2008 support on platforms that +# requires it, glibc currently checks for an (inexisting) 10.0.0 +# kernel headers version. +# +# Since in practice the kernel support for NaN2008 is not really +# required for things to work properly, we adjust the glibc check to +# make it believe that NaN2008 support was added in the kernel +# starting from version 4.0.0. +# +# In general the compatibility issues introduced by mis-matched NaN +# encodings will not cause a problem as signalling NaNs are rarely used +# in average code. For MIPS R6 there isn't actually any compatibility +# issue as the hardware is always NaN2008 and software is always +# NaN2008. The problem only comes from when older MIPS code is linked in +# via a DSO and multiple NaN encodings are introduced. Since Buildroot +# is intended to have all code built from source then this scenario is +# highly unlikely. The failure mode, if it ever occurs, would be either +# that a signalling NaN fails to raise an invalid operation exception or +# (more likely) an ordinary NaN raises an invalid operation exception. +ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y) +define GLIBC_FIX_MIPS_R6 + $(SED) 's#10.0.0#4.0.0#' \ + $(@D)/sysdeps/unix/sysv/linux/mips/configure \ + $(@D)/sysdeps/unix/sysv/linux/mips/configure.ac +endef +GLIBC_POST_EXTRACT_HOOKS += GLIBC_FIX_MIPS_R6 +endif + +$(eval $(autotools-package)) diff --git a/package/glibc/glibc/nsswitch.conf b/package/glibc/glibc/nsswitch.conf new file mode 100644 index 0000000..5c38491 --- /dev/null +++ b/package/glibc/glibc/nsswitch.conf @@ -0,0 +1,13 @@ +# /etc/nsswitch.conf + +passwd: files +group: files +shadow: files + +hosts: files dns +networks: files dns + +protocols: files +services: files +ethers: files +rpc: files diff --git a/package/qt5/Config.in b/package/qt5/Config.in index 234dfdd..fb57d25 100644 --- a/package/qt5/Config.in +++ b/package/qt5/Config.in @@ -31,6 +31,7 @@ menuconfig BR2_PACKAGE_QT5 if BR2_PACKAGE_QT5 source "package/qt5/qt5base/Config.in" +source "package/qt5/qt53d/Config.in" source "package/qt5/qt5canvas3d/Config.in" source "package/qt5/qt5connectivity/Config.in" source "package/qt5/qt5declarative/Config.in" @@ -41,17 +42,20 @@ source "package/qt5/qt5location/Config.in" source "package/qt5/qt5multimedia/Config.in" source "package/qt5/qt5quickcontrols/Config.in" source "package/qt5/qt5sensors/Config.in" +source "package/qt5/qt5serialbus/Config.in" source "package/qt5/qt5serialport/Config.in" +source "package/qt5/qt5wayland/Config.in" source "package/qt5/qt5svg/Config.in" source "package/qt5/qt5tools/Config.in" source "package/qt5/qt5webchannel/Config.in" source "package/qt5/qt5websockets/Config.in" source "package/qt5/qt5x11extras/Config.in" +source "package/qt5/qt5webengine/Config.in" source "package/qt5/qt5xmlpatterns/Config.in" -comment "technology preview" -source "package/qt5/qt53d/Config.in" +source "package/qt5/qt5virtualkeyboard/Config.in" +source "package/qt5/qt5charts/Config.in" +source "package/qt5/qt5datavis3d/Config.in" source "package/qt5/qt5quickcontrols2/Config.in" -source "package/qt5/qt5serialbus/Config.in" comment "legacy compatibility" source "package/qt5/qt5script/Config.in" source "package/qt5/qt5webkit/Config.in" diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk index d25f663..0710ef4 100644 --- a/package/qt5/qt5.mk +++ b/package/qt5/qt5.mk @@ -1,6 +1,8 @@ -QT5_VERSION_MAJOR = 5.6 -QT5_VERSION = $(QT5_VERSION_MAJOR).2 +QT5_VERSION_MAJOR = 5.7 +QT5_VERSION = $(QT5_VERSION_MAJOR).0 QT5_SITE = http://download.qt.io/official_releases/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)/submodules +##QT5_VERSION = $(QT5_VERSION_MAJOR).1 +##QT5_SITE = http://download.qt.io/snapshots/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)/latest_src/submodules include $(sort $(wildcard package/qt5/*/*.mk)) define QT5_LA_PRL_FILES_FIXUP diff --git a/package/qt5/qt53d/qt53d.hash b/package/qt5/qt53d/qt53d.hash index 7179380..f59a671 100644 --- a/package/qt5/qt53d/qt53d.hash +++ b/package/qt5/qt53d/qt53d.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qt3d-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 a21786db6e0f5c6c70213fe1a3530ed3d7f28f28401a0f793970e9bc860ce941 qt3d-opensource-src-5.6.2.tar.xz +sha256 a8248a1779b561ea450e92345e8187bacac359df0e92ad61a1ad7652bb233e29 qt3d-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.__patch b/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.__patch new file mode 100644 index 0000000..54e4db8 --- /dev/null +++ b/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.__patch @@ -0,0 +1,44 @@ +From e69e69519661954716d59bfa5bbd0626515cfda9 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 3 Mar 2016 15:17:31 +0100 +Subject: [PATCH] Disable c++ standard compiler flags for the host build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There is no test for c++ standard support for the host build +(only for the target compiler/build) which leads to trouble +in some cross compiling environments (old host compiler, new +cross compiler): + + g++: error: unrecognized command line option ‘-std=c++1z’ + +So disable c++ standard compiler flags unconditionally for host builds. + +Task-number: QTBUG-51644 +Change-Id: Ifb3042e125fe199a7e081740d1171d26ccacf0c5 +Reviewed-by: Oswald Buddenhagen +Signed-off-by: Yegor Yefremov +--- + mkspecs/features/default_post.prf | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf +index cd8d885..561c8f4 100644 +--- a/mkspecs/features/default_post.prf ++++ b/mkspecs/features/default_post.prf +@@ -95,7 +95,10 @@ breakpad { + !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME) + } + +-c++11|c++14|c++1z { ++# Disable special compiler flags for host builds (needs to be changed for 5.7 ++# to fall back to c++11 because since 5.7 c++11 is required everywhere, ++# including host builds). ++if(!host_build|!cross_compile):if(c++11|c++14|c++1z) { + c++1z: cxxstd = CXX1Z + else: c++14: cxxstd = CXX14 + else: cxxstd = CXX11 +-- +2.1.4 + diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in index 7244fbe..64a7f65 100644 --- a/package/qt5/qt5base/Config.in +++ b/package/qt5/qt5base/Config.in @@ -180,7 +180,7 @@ config BR2_PACKAGE_QT5BASE_DIRECTFB bool "directfb support" depends on BR2_PACKAGE_DIRECTFB -comment "directfb backend available if directfb is enabled" +comment "directfb backend if directb is enabled" depends on !BR2_PACKAGE_DIRECTFB config BR2_PACKAGE_QT5BASE_XCB diff --git a/package/qt5/qt5base/qmake.conf b/package/qt5/qt5base/qmake.conf index 49cf898..2152d3c 100644 --- a/package/qt5/qt5base/qmake.conf +++ b/package/qt5/qt5base/qmake.conf @@ -19,7 +19,6 @@ QMAKE_CXXFLAGS_RELEASE += -O3 CONFIG += nostrip QMAKE_LIBS += -lrt -lpthread -ldl -QMAKE_CFLAGS_ISYSTEM = include(../common/linux_device_post.conf) load(qt_config) diff --git a/package/qt5/qt5base/qt5base.hash b/package/qt5/qt5base/qt5base.hash index 9808e9b..6795b60 100644 --- a/package/qt5/qt5base/qt5base.hash +++ b/package/qt5/qt5base/qt5base.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtbase-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 2f6eae93c5d982fe0a387a01aeb3435571433e23e9d9d9246741faf51f1ee787 qtbase-opensource-src-5.6.2.tar.xz +sha256 3e7b6d123cab23a587ccbc45173296b33786faa409dba0494e4658fda3ede646 qtbase-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk index 23dba2a..81666d6 100644 --- a/package/qt5/qt5base/qt5base.mk +++ b/package/qt5/qt5base/qt5base.mk @@ -20,21 +20,16 @@ QT5BASE_INSTALL_STAGING = YES # want to use the one packaged in Buildroot QT5BASE_CONFIGURE_OPTS += \ -optimized-qmake \ + -no-kms \ -no-cups \ + -no-nis \ -no-iconv \ -system-zlib \ -system-pcre \ + -system-harfbuzz \ -no-pch \ -shared -# Uses libgbm from mesa3d -ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) -QT5BASE_CONFIGURE_OPTS += -kms -gbm -QT5BASE_DEPENDENCIES += mesa3d -else -QT5BASE_CONFIGURE_OPTS += -no-kms -endif - ifeq ($(BR2_ENABLE_DEBUG),y) QT5BASE_CONFIGURE_OPTS += -debug else @@ -58,10 +53,6 @@ ifneq ($(QT5BASE_CONFIG_FILE),) QT5BASE_CONFIGURE_OPTS += -qconfig buildroot endif -ifeq ($(BR2_PACKAGE_HAS_UDEV),y) -QT5BASE_DEPENDENCIES += udev -endif - # Qt5 SQL Plugins ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y) ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y) diff --git a/package/qt5/qt5canvas3d/qt5canvas3d.hash b/package/qt5/qt5canvas3d/qt5canvas3d.hash index 01819e4..2d13e40 100644 --- a/package/qt5/qt5canvas3d/qt5canvas3d.hash +++ b/package/qt5/qt5canvas3d/qt5canvas3d.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtcanvas3d-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 d7584d006b03f99692ccabce922e755a6f12bb1ed1fbc99c2b84842b9e0aa0ad qtcanvas3d-opensource-src-5.6.2.tar.xz +sha256 7871b3fd4c1a561c5b3eb57746e8504bc5d8fa626f9df578e619f9e823e3bd97 qtcanvas3d-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5charts/Config.in b/package/qt5/qt5charts/Config.in new file mode 100644 index 0000000..d354bb2 --- /dev/null +++ b/package/qt5/qt5charts/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_QT5CHARTS + bool "qt5charts" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + select BR2_PACKAGE_QT5BASE_WIDGETS + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5charts module. + + http://qt.io + +comment "qt5charts needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5charts/qt5charts.mk b/package/qt5/qt5charts/qt5charts.mk new file mode 100644 index 0000000..c813354 --- /dev/null +++ b/package/qt5/qt5charts/qt5charts.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5charts +# +################################################################################ + +QT5CHARTS_VERSION = $(QT5_VERSION) +QT5CHARTS_SITE = $(QT5_SITE) +QT5CHARTS_SOURCE = qtcharts-opensource-src-$(QT5CHARTS_VERSION).tar.xz +QT5CHARTS_DEPENDENCIES = qt5base qt5declarative +QT5CHARTS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5CHARTS_LICENSE = GPLv3 +QT5CHARTS_LICENSE_FILES = LICENSE.GPL3 +else +QT5CHARTS_LICENSE = Commercial license +QT5CHARTS_REDISTRIBUTE = NO +endif + +define QT5CHARTS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5CHARTS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5CHARTS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5CHARTS_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/lib/libQt5Charts.so.* $(TARGET_DIR)/usr/lib/ + cp -dpfr $(STAGING_DIR)/usr/qml/QtCharts $(TARGET_DIR)/usr/qml/ +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5connectivity/Config.in b/package/qt5/qt5connectivity/Config.in index fa9b911..d529ea7 100644 --- a/package/qt5/qt5connectivity/Config.in +++ b/package/qt5/qt5connectivity/Config.in @@ -1,9 +1,13 @@ config BR2_PACKAGE_QT5CONNECTIVITY bool "qt5connectivity" + select BR2_PACKAGE_BLUEZ_UTILS select BR2_PACKAGE_QT5BASE select BR2_PACKAGE_QT5BASE_CONCURRENT select BR2_PACKAGE_QT5BASE_DBUS - depends on BR2_PACKAGE_NEARD || BR2_PACKAGE_BLUEZ_UTILS || BR2_PACKAGE_BLUEZ5_UTILS + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils + depends on BR2_USE_MMU # bluez_utils help Qt is a cross-platform application and UI framework for developers using C++. @@ -12,6 +16,6 @@ config BR2_PACKAGE_QT5CONNECTIVITY http://qt.io -comment "qt5connectivity needs neard and/or bluez(5)_utils" - depends on !BR2_PACKAGE_NEARD && !BR2_PACKAGE_BLUEZ_UTILS && \ - !BR2_PACKAGE_BLUEZ5_UTILS +comment "qt5connectivity needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/qt5/qt5connectivity/qt5connectivity.hash b/package/qt5/qt5connectivity/qt5connectivity.hash index 4574f3d..00b7c20 100644 --- a/package/qt5/qt5connectivity/qt5connectivity.hash +++ b/package/qt5/qt5connectivity/qt5connectivity.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtconnectivity-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 1b672923e0703d62f605ccec97b454b1a04c1f0db47f54b687d009e84eabedf9 qtconnectivity-opensource-src-5.6.2.tar.xz +sha256 9844ca7ec5be187a77dfd7e95051fb267006f6c77157ecb0b8ceeac103a32703 qtconnectivity-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk index 0f7257d..936bc6f 100644 --- a/package/qt5/qt5connectivity/qt5connectivity.mk +++ b/package/qt5/qt5connectivity/qt5connectivity.mk @@ -7,7 +7,7 @@ QT5CONNECTIVITY_VERSION = $(QT5_VERSION) QT5CONNECTIVITY_SITE = $(QT5_SITE) QT5CONNECTIVITY_SOURCE = qtconnectivity-opensource-src-$(QT5CONNECTIVITY_VERSION).tar.xz -QT5CONNECTIVITY_DEPENDENCIES = qt5base +QT5CONNECTIVITY_DEPENDENCIES = bluez_utils qt5base QT5CONNECTIVITY_INSTALL_STAGING = YES ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) @@ -18,10 +18,9 @@ QT5CONNECTIVITY_LICENSE = Commercial license QT5CONNECTIVITY_REDISTRIBUTE = NO endif -QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5DECLARATIVE),qt5declarative) -QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) -QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_BLUEZ5_UTILS),bluez5_utils) -QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_NEARD),neard) +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5CONNECTIVITY_DEPENDENCIES += qt5declarative +endif define QT5CONNECTIVITY_CONFIGURE_CMDS (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) @@ -37,36 +36,15 @@ define QT5CONNECTIVITY_INSTALL_STAGING_CMDS endef ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) -ifneq ($(BR2_PACKAGE_BLUEZ_UTILS)$(BR2_PACKAGE_BLUEZ5_UTILS),) -define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS +define QT5CONNECTIVITY_INSTALL_TARGET_QMLS cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/ endef endif -ifeq ($(BR2_PACKAGE_NEARD),y) -define QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS - cp -dpfr $(STAGING_DIR)/usr/qml/QtNfc $(TARGET_DIR)/usr/qml/ -endef -endif -endif -ifneq ($(BR2_PACKAGE_BLUEZ_UTILS)$(BR2_PACKAGE_BLUEZ5_UTILS),) -define QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH +define QT5CONNECTIVITY_INSTALL_TARGET_CMDS cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin -endef -endif - -ifeq ($(BR2_PACKAGE_NEARD),y) -define QT5CONNECTIVITY_INSTALL_TARGET_NFC - cp -dpf $(STAGING_DIR)/usr/lib/libQt5Nfc.so.* $(TARGET_DIR)/usr/lib -endef -endif - -define QT5CONNECTIVITY_INSTALL_TARGET_CMDS - $(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH) - $(QT5CONNECTIVITY_INSTALL_TARGET_NFC) - $(QT5CONNECTIVITY_INSTALL_TARGET_BLUETOOTH_QMLS) - $(QT5CONNECTIVITY_INSTALL_TARGET_NFC_QMLS) + $(QT5CONNECTIVITY_INSTALL_TARGET_QMLS) endef $(eval $(generic-package)) diff --git a/package/qt5/qt5datavis3d/Config.in b/package/qt5/qt5datavis3d/Config.in new file mode 100644 index 0000000..c7aca95 --- /dev/null +++ b/package/qt5/qt5datavis3d/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5DATAVIS3D + bool "qt5datavis3d" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5datavis3d module. + + http://qt.io + +comment "qt5canvas3d needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5datavis3d/qt5datavis3d.mk b/package/qt5/qt5datavis3d/qt5datavis3d.mk new file mode 100644 index 0000000..9101148 --- /dev/null +++ b/package/qt5/qt5datavis3d/qt5datavis3d.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5datavis3d +# +################################################################################ + +QT5DATAVIS3D_VERSION = $(QT5_VERSION) +QT5DATAVIS3D_SITE = $(QT5_SITE) +QT5DATAVIS3D_SOURCE = qtdatavis3d-opensource-src-$(QT5DATAVIS3D_VERSION).tar.xz +QT5DATAVIS3D_DEPENDENCIES = qt5base qt5declarative +QT5DATAVIS3D_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5DATAVIS3D_LICENSE = GPLv3 +QT5DATAVIS3D_LICENSE_FILES = LICENSE.GPL3 +else +QT5DATAVIS3D_LICENSE = Commercial license +QT5DATAVIS3D_REDISTRIBUTE = NO +endif + +define QT5DATAVIS3D_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5DATAVIS3D_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5DATAVIS3D_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5DATAVIS3D_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/lib/libQt5DataVisualization.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/qml/QtDataVisualization $(TARGET_DIR)/usr/qml/ +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5declarative/qt5declarative.hash b/package/qt5/qt5declarative/qt5declarative.hash index d8d3a68..6779669 100644 --- a/package/qt5/qt5declarative/qt5declarative.hash +++ b/package/qt5/qt5declarative/qt5declarative.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtdeclarative-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 0086a986bc36b398ba518c404d08cdff0a0d7978c30aa3fa2ab73d71654209da qtdeclarative-opensource-src-5.6.2.tar.xz +sha256 86de6239f3aee2e5f561c16ad7b6e47d8f341c293d4ed11c85acbc21888cf9f4 qtdeclarative-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5enginio/qt5enginio.hash b/package/qt5/qt5enginio/qt5enginio.hash index 9951834..95f507c 100644 --- a/package/qt5/qt5enginio/qt5enginio.hash +++ b/package/qt5/qt5enginio/qt5enginio.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtenginio-opensource-src-1.6.2.tar.xz.mirrorlist -sha256 90ffc38d214a75ab0ef90a4760843f12bc073ae49c17de24c677d1d403bddcc3 qtenginio-opensource-src-1.6.2.tar.xz +sha256 627ddcfbbfc3ec1a83c9dbb5f24287b5cd6cb5d3b9d09af4d1c444c6ac147f0c qtenginio-opensource-src-1.6.0.tar.xz diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk index ada5fa7..b858d1c 100644 --- a/package/qt5/qt5enginio/qt5enginio.mk +++ b/package/qt5/qt5enginio/qt5enginio.mk @@ -6,7 +6,7 @@ # Qt5Enginio does not follow Qt versionning # see https://bugreports.qt.io/browse/QTBUG-50111 -QT5ENGINIO_VERSION = 1.6.2 +QT5ENGINIO_VERSION = 1.6.0 QT5ENGINIO_SITE = $(QT5_SITE) QT5ENGINIO_SOURCE = qtenginio-opensource-src-$(QT5ENGINIO_VERSION).tar.xz QT5ENGINIO_DEPENDENCIES = openssl qt5base diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash index ae29e3b..7c79a99 100644 --- a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash +++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtgraphicaleffects-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 1e9f0fac2c72a812d396db74b2d9d12f513d2ec9135d5982ca85aee7f00be75e qtgraphicaleffects-opensource-src-5.6.2.tar.xz +sha256 c816539ce345e502425a94c624332df78f53aeebc460d76b53b79b59cb938de7 qtgraphicaleffects-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5imageformats/qt5imageformats.hash b/package/qt5/qt5imageformats/qt5imageformats.hash index 54b58e4..b65be40 100644 --- a/package/qt5/qt5imageformats/qt5imageformats.hash +++ b/package/qt5/qt5imageformats/qt5imageformats.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtimageformats-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 4fb153be62dac393cbcebab65040b3b9d6edecd1ebbe5e543401b0e45bd147e4 qtimageformats-opensource-src-5.6.2.tar.xz +sha256 ef3344a44194d1414be585f8c8a652ffe217c663a22b6e26d3bb5e114f3f62e5 qtimageformats-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5location/qt5location.hash b/package/qt5/qt5location/qt5location.hash index 374952f..074168e 100644 --- a/package/qt5/qt5location/qt5location.hash +++ b/package/qt5/qt5location/qt5location.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtlocation-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 7a8995206ed0220f943a33c037527a1a8243d5386f5ca77bf88152675c28d23a qtlocation-opensource-src-5.6.2.tar.xz +sha256 70273367342493a77c050f033a92d96e79925aa70308746e9681d8661f4aa865 qtlocation-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in index 7549b35..59c3984 100644 --- a/package/qt5/qt5multimedia/Config.in +++ b/package/qt5/qt5multimedia/Config.in @@ -3,7 +3,6 @@ config BR2_PACKAGE_QT5MULTIMEDIA select BR2_PACKAGE_QT5BASE select BR2_PACKAGE_QT5BASE_GUI select BR2_PACKAGE_QT5BASE_NETWORK - select BR2_PACKAGE_QT5BASE_OPENGL_LIB if BR2_PACKAGE_QT5BASE_OPENGL help Qt is a cross-platform application and UI framework for developers using C++. diff --git a/package/qt5/qt5multimedia/qt5multimedia.hash b/package/qt5/qt5multimedia/qt5multimedia.hash index 56a11fb..1a85f95 100644 --- a/package/qt5/qt5multimedia/qt5multimedia.hash +++ b/package/qt5/qt5multimedia/qt5multimedia.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtmultimedia-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 cb9a70a7c6c0eb5be4a3fcaf9590863479e95a255308bbf07d5b7aa303bb8caf qtmultimedia-opensource-src-5.6.2.tar.xz +sha256 05ae705bda224a600b06e390aa7b1448c4a6a52d2d37842d2121fb4a5d84b559 qtmultimedia-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.hash b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash index 6db589d..cf438f8 100644 --- a/package/qt5/qt5quickcontrols/qt5quickcontrols.hash +++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtquickcontrols-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 5ed0f2292be10222dfb1b57a05472798fd759279f65455d91c02ef4fb746102c qtquickcontrols-opensource-src-5.6.2.tar.xz +sha256 d8e19a77100fff109585ccc62116e63dd11ce9486056a8eb5b64159b7ecdec32 qtquickcontrols-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash index 0d85d48..c43afd7 100644 --- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash +++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtquickcontrols2-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 09dc1710aa4701aebe145829eb99bab94d0870cf578f7dddcec0af92286dfec1 qtquickcontrols2-opensource-src-5.6.2.tar.xz +sha256 63f5b0777992c32bd602b88de657e202cd6d5e8ba0371c6d5da16fb8c7481045 qtquickcontrols2-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk index a5ad3f6..622e61f 100644 --- a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk +++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk @@ -31,10 +31,10 @@ define QT5QUICKCONTROLS2_INSTALL_STAGING_CMDS endef define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS - cp -dpf $(STAGING_DIR)/usr/lib/libQt5LabsTemplates.so.* $(TARGET_DIR)/usr/lib - cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/controls $(TARGET_DIR)/usr/qml/Qt/labs - cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs - cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/templates $(TARGET_DIR)/usr/qml/Qt/labs + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Quick*.so.* $(TARGET_DIR)/usr/lib +# cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/controls $(TARGET_DIR)/usr/qml/Qt/labs +# cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs +# cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/templates $(TARGET_DIR)/usr/qml/Qt/labs endef $(eval $(generic-package)) diff --git a/package/qt5/qt5sensors/qt5sensors.hash b/package/qt5/qt5sensors/qt5sensors.hash index 65cd127..ec62e3b 100644 --- a/package/qt5/qt5sensors/qt5sensors.hash +++ b/package/qt5/qt5sensors/qt5sensors.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtsensors-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 a7809081aab4f2f0d7a4f40c3abb02e1690bb390d1dd410d7c6c5019a5053427 qtsensors-opensource-src-5.6.2.tar.xz +sha256 283dcc66a24c4367e865fa8301b6ea04d0cb78bd0f166fd09a6bb42e1e3731be qtsensors-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5serialbus/Config.in b/package/qt5/qt5serialbus/Config.in index f5b713d..504141c 100644 --- a/package/qt5/qt5serialbus/Config.in +++ b/package/qt5/qt5serialbus/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_QT5SERIALBUS bool "qt5serialbus" - depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 # CAN FD select BR2_PACKAGE_QT5BASE select BR2_PACKAGE_QT5SERIALPORT help @@ -10,6 +9,3 @@ config BR2_PACKAGE_QT5SERIALBUS This package corresponds to the qt5serialbus module. http://qt.io - -comment "qt5serialbus needs headers >= 3.6" - depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 diff --git a/package/qt5/qt5serialbus/qt5serialbus.hash b/package/qt5/qt5serialbus/qt5serialbus.hash index 308c365..0597219 100644 --- a/package/qt5/qt5serialbus/qt5serialbus.hash +++ b/package/qt5/qt5serialbus/qt5serialbus.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtserialbus-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 b39260091691532382935ed51de9ead8e66cfb5f7a6e5410c17cd0695ccaf826 qtserialbus-opensource-src-5.6.2.tar.xz +sha256 2c437ace393e9dcf170990b519cec59c5cbcfc3c830e46116abb52549dc15d38 qtserialbus-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5serialport/qt5serialport.hash b/package/qt5/qt5serialport/qt5serialport.hash index 2458e5d..7751d64 100644 --- a/package/qt5/qt5serialport/qt5serialport.hash +++ b/package/qt5/qt5serialport/qt5serialport.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtserialport-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 af76281bad2c2bd283189635316b46091f6712134b845ae1b9e3016eec94f376 qtserialport-opensource-src-5.6.2.tar.xz +sha256 5ce150d843a243854736489d4a71205a8ca8dc8f93626ec29d1aa7a249a08265 qtserialport-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5svg/qt5svg.hash b/package/qt5/qt5svg/qt5svg.hash index 0c9e9eb..0c3a9ff 100644 --- a/package/qt5/qt5svg/qt5svg.hash +++ b/package/qt5/qt5svg/qt5svg.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtsvg-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 f7a361bf661b31ae7779513559dd0b774171911bc57f5cfb6bed6878ddc8bc4e qtsvg-opensource-src-5.6.2.tar.xz +sha256 a1f89f035aed48bf8843ff1880c4b54dc2e3a5160dbd743aec03e13831cdd881 qtsvg-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch b/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch new file mode 100644 index 0000000..61cbdfe --- /dev/null +++ b/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch @@ -0,0 +1,30 @@ +From acdb24783322bb6e69df61cf04df2b2e47a06ad2 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 29 Mar 2016 13:37:09 +0200 +Subject: [PATCH] Disable qdoc (needs qtdeclarative). + +Fixes: + + Project ERROR: Unknown module(s) in QT: qmldevtools-private + Makefile:63: recipe for target 'sub-qdoc-qmake_all' failed + +Signed-off-by: Peter Seiderer +--- + src/src.pro | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/src.pro b/src/src.pro +index 387d54f..494898f 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -14,7 +14,6 @@ qtHaveModule(widgets) { + } + + SUBDIRS += linguist \ +- qdoc \ + qtplugininfo + if(!android|android_app):!ios: SUBDIRS += qtpaths + +-- +2.1.4 + diff --git a/package/qt5/qt5virtualkeyboard/Config.in b/package/qt5/qt5virtualkeyboard/Config.in new file mode 100644 index 0000000..803b937 --- /dev/null +++ b/package/qt5/qt5virtualkeyboard/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5VIRTUALKEYBOARD + bool "qt5virtualkeyboard" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5virtualkeyboard module. + + http://qt.io \ No newline at end of file diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk new file mode 100644 index 0000000..bedefc5 --- /dev/null +++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5virtualkeyboard +# +################################################################################ + +QT5VIRTUALKEYBOARD_VERSION = $(QT5_VERSION) +QT5VIRTUALKEYBOARD_SITE = $(QT5_SITE) +QT5VIRTUALKEYBOARD_SOURCE = qtvirtualkeyboard-opensource-src-$(QT5VIRTUALKEYBOARD_VERSION).tar.xz +QT5VIRTUALKEYBOARD_DEPENDENCIES = qt5base qt5declarative +QT5VIRTUALKEYBOARD_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5VIRTUALKEYBOARD_LICENSE = GPLv3 +QT5VIRTUALKEYBOARD_LICENSE_FILES = LICENSE.GPL3 +else +QT5VIRTUALKEYBOARD_LICENSE = Commercial license +QT5VIRTUALKEYBOARD_REDISTRIBUTE = NO +endif + +define QT5VIRTUALKEYBOARD_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake CONFIG+=disable-desktop) +endef + +define QT5VIRTUALKEYBOARD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5VIRTUALKEYBOARD_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5VIRTUALKEYBOARD_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so $(TARGET_DIR)/usr/lib/qt/plugins/platforminputcontexts + cp -dpfrv $(STAGING_DIR)/usr/qml/QtQuick/VirtualKeyboard $(TARGET_DIR)/usr/qml/QtQuick/ + +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5wayland/Config.in b/package/qt5/qt5wayland/Config.in new file mode 100644 index 0000000..dbb67b7 --- /dev/null +++ b/package/qt5/qt5wayland/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_QT5WAYLAND + bool "qt5wayland" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5JSBACKEND + depends on BR2_PACKAGE_WAYLAND + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5wayland module. + + http://qt.io \ No newline at end of file diff --git a/package/qt5/qt5wayland/qt5wayland.mk b/package/qt5/qt5wayland/qt5wayland.mk new file mode 100644 index 0000000..436934d --- /dev/null +++ b/package/qt5/qt5wayland/qt5wayland.mk @@ -0,0 +1,35 @@ +# (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake -r CONFIG+=wayland-compositor ) +################################################################################ +# +# qt5wayland +# +################################################################################ + +QT5WAYLAND_VERSION = $(QT5_VERSION) +QT5WAYLAND_SITE = $(QT5_SITE) +QT5WAYLAND_SOURCE = qtwayland-opensource-src-$(QT5WAYLAND_VERSION).tar.xz +QT5WAYLAND_DEPENDENCIES = qt5base qt5declarative wayland +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +QT5WAYLAND_DEPENDENCIES += libegl +endif +QT5WAYLAND_INSTALL_STAGING = YES + +define QT5WAYLAND_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WAYLAND_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WAYLAND_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5WAYLAND_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WaylandClient.so* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/wayland-*-client $(TARGET_DIR)/usr/lib/qt/plugins + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/platforms/libqwayland-*.so $(TARGET_DIR)/usr/lib/qt/plugins/platforms +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webchannel/qt5webchannel.hash b/package/qt5/qt5webchannel/qt5webchannel.hash index 0f9eaae..c4fc230 100644 --- a/package/qt5/qt5webchannel/qt5webchannel.hash +++ b/package/qt5/qt5webchannel/qt5webchannel.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtwebchannel-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 700efdef5f51bdb77093f4db212afe275ad35a710ea08ba0e9e9cbc8f09f1a52 qtwebchannel-opensource-src-5.6.2.tar.xz +sha256 3ab4cd177cc742ee5015f2b7f943c16ce13380b840f824436b5005485b749816 qtwebchannel-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5webengine/001-chromium-glibc-2.24-issue.patch b/package/qt5/qt5webengine/001-chromium-glibc-2.24-issue.patch new file mode 100644 index 0000000..f3d5bda --- /dev/null +++ b/package/qt5/qt5webengine/001-chromium-glibc-2.24-issue.patch @@ -0,0 +1,14 @@ +--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp 2016-05-26 15:53:47.000000000 +0200 ++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp 2016-11-19 00:19:49.894527354 +0100 +@@ -39,6 +39,11 @@ + + #include + ++#if OS(LINUX) && defined(MADV_FREE) ++// glibc 2.24 issues in qtwebengine ++#undef MADV_FREE ++#endif ++ + #ifndef MADV_FREE + #define MADV_FREE MADV_DONTNEED + #endif diff --git a/package/qt5/qt5webengine/001-delegate_frame_node_fence_sync.patch b/package/qt5/qt5webengine/001-delegate_frame_node_fence_sync.patch new file mode 100644 index 0000000..c7bdcff --- /dev/null +++ b/package/qt5/qt5webengine/001-delegate_frame_node_fence_sync.patch @@ -0,0 +1,20 @@ +--- a/src/core/delegated_frame_node.cpp 2016-03-03 17:02:28.000000000 +0100 ++++ b/src/core/delegated_frame_node.cpp 2016-04-09 21:01:03.502390661 +0200 +@@ -194,7 +194,7 @@ + case gfx::TransferableFence::NoSync: + break; + case gfx::TransferableFence::EglSync: +-#ifdef EGL_KHR_reusable_sync ++#ifdef EGL_KHR_fence_sync + { + static bool resolved = false; + static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR = 0; +@@ -235,7 +235,7 @@ + case gfx::TransferableFence::NoSync: + break; + case gfx::TransferableFence::EglSync: +-#ifdef EGL_KHR_reusable_sync ++#ifdef EGL_KHR_fence_sync + { + static bool resolved = false; + static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR = 0; diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in new file mode 100644 index 0000000..b630a85 --- /dev/null +++ b/package/qt5/qt5webengine/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5WEBENGINE + bool "qt5webengine" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI +# select BR2_PACKAGE_QT5BASE_FONTCONFIG + select BR2_PACKAGE_QT5BASE_DBUS + select BR2_PACKAGE_QT5BASE_ICU + select BR2_PACKAGE_QT5WEBCHANNEL + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5webengine module. diff --git a/package/qt5/qt5webengine/patches_save/001-allow-arm-compiler.patch b/package/qt5/qt5webengine/patches_save/001-allow-arm-compiler.patch new file mode 100644 index 0000000..bb8aa69 --- /dev/null +++ b/package/qt5/qt5webengine/patches_save/001-allow-arm-compiler.patch @@ -0,0 +1,26 @@ +diff '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*ninja*' -Naur qt5_a/src/3rdparty/chromium/build/common.gypi qt5webengine-5.5.1/src/3rdparty/chromium/build/common.gypi +--- qt5_a/src/3rdparty/chromium/build/common.gypi 2015-10-13 06:36:43.000000000 +0200 ++++ qt5webengine-5.5.1/src/3rdparty/chromium/build/common.gypi 2016-02-09 16:37:54.729166157 +0100 +@@ -2294,7 +2294,7 @@ + }], + ], + # Change the default to hard once the armhf transition is complete. +- 'arm_float_abi%': 'softfp', ++ 'arm_float_abi%': 'hard', + 'arm_thumb%': 1, + }], + +--- qt5webengine-5.5.1/tools/qmake/mkspecs/features/functions.prf 2015-10-13 06:36:55.000000000 +0200 ++++ qt5_we_b/tools/qmake/mkspecs/features/functions.prf 2016-02-09 21:44:30.829783885 +0100 +@@ -12,9 +12,9 @@ + return(false) + } + +- linux-g++*:!isGCCVersionSupported(): return(false) ++ linux*g++*:!isGCCVersionSupported(): return(false) + !isPythonVersionSupported(): return(false) +- linux-g++*|win32-msvc2013|macx-clang: return(true) ++ linux*g++*|win32-msvc2013|macx-clang: return(true) + boot2qt: return(true) + + skipBuild("Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.") diff --git a/package/qt5/qt5webengine/patches_save/002-buildroot-python-bz2.patch b/package/qt5/qt5webengine/patches_save/002-buildroot-python-bz2.patch new file mode 100644 index 0000000..b780f49 --- /dev/null +++ b/package/qt5/qt5webengine/patches_save/002-buildroot-python-bz2.patch @@ -0,0 +1,11 @@ +--- a/src/3rdparty/chromium/v8/tools/js2c.py 2016-03-03 15:48:36.000000000 +0100 ++++ b/src/3rdparty/chromium/v8/tools/js2c.py 2016-04-28 15:56:42.219174252 +0200 +@@ -34,7 +34,7 @@ + import os, re, sys, string + import optparse + import jsmin +-import bz2 ++##import bz2 + import textwrap + + diff --git a/package/qt5/qt5webengine/patches_save/002-move_icu_to_56_1.patch b/package/qt5/qt5webengine/patches_save/002-move_icu_to_56_1.patch new file mode 100644 index 0000000..a917a9c --- /dev/null +++ b/package/qt5/qt5webengine/patches_save/002-move_icu_to_56_1.patch @@ -0,0 +1,43 @@ +--- qt5webengine-5.5.1/src/3rdparty/chromium/third_party/icu/source/common/unicode/uvernum.h 2015-10-13 06:36:26.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/third_party/icu/source/common/unicode/uvernum.h 2016-02-11 12:06:28.304679220 +0100 +@@ -57,7 +57,7 @@ + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +-#define U_ICU_VERSION_MAJOR_NUM 52 ++#define U_ICU_VERSION_MAJOR_NUM 56 + + /** The current ICU minor version as an integer. + * This value will change in the subsequent releases of ICU +@@ -83,7 +83,7 @@ + * This value will change in the subsequent releases of ICU + * @stable ICU 2.6 + */ +-#define U_ICU_VERSION_SUFFIX _52 ++#define U_ICU_VERSION_SUFFIX _56 + + /** + * \def U_DEF2_ICU_ENTRY_POINT_RENAME +@@ -118,19 +118,19 @@ + * This value will change in the subsequent releases of ICU + * @stable ICU 2.4 + */ +-#define U_ICU_VERSION "52.1" ++#define U_ICU_VERSION "56.1" + + /** The current ICU library major/minor version as a string without dots, for library name suffixes. + * This value will change in the subsequent releases of ICU + * @stable ICU 2.6 + */ +-#define U_ICU_VERSION_SHORT "52" ++#define U_ICU_VERSION_SHORT "56" + + #ifndef U_HIDE_INTERNAL_API + /** Data version in ICU4C. + * @internal ICU 4.4 Internal Use Only + **/ +-#define U_ICU_DATA_VERSION "52.1" ++#define U_ICU_DATA_VERSION "56.1" + #endif /* U_HIDE_INTERNAL_API */ + + /*=========================================================================== diff --git a/package/qt5/qt5webengine/patches_save/003-egl_khr_reusable_sync.patch b/package/qt5/qt5webengine/patches_save/003-egl_khr_reusable_sync.patch new file mode 100644 index 0000000..8d633d9 --- /dev/null +++ b/package/qt5/qt5webengine/patches_save/003-egl_khr_reusable_sync.patch @@ -0,0 +1,14 @@ +--- qt5webengine-5.5.1/src/core/delegated_frame_node.cpp 2015-10-13 06:36:54.000000000 +0200 ++++ qt5_b/src/core/delegated_frame_node.cpp 2016-02-11 13:27:42.142167151 +0100 +@@ -76,6 +76,11 @@ + #include + #endif + ++#ifdef EGL_KHR_reusable_sync ++#undef EGL_KHR_reusable_sync ++#endif ++ ++ + namespace QtWebEngineCore { + + class MailboxTexture : public QSGTexture, protected QOpenGLFunctions { diff --git a/package/qt5/qt5webengine/patches_save/004-allow-egl-surface.patch b/package/qt5/qt5webengine/patches_save/004-allow-egl-surface.patch new file mode 100644 index 0000000..604cb88 --- /dev/null +++ b/package/qt5/qt5webengine/patches_save/004-allow-egl-surface.patch @@ -0,0 +1,166 @@ +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/base/files/file_proxy_unittest.cc qt5_b/src/3rdparty/chromium/base/files/file_proxy_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/base/files/file_proxy_unittest.cc 2015-10-13 06:36:48.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/base/files/file_proxy_unittest.cc 2016-02-12 17:58:52.694043375 +0100 +@@ -142,7 +142,7 @@ + } + + TEST_F(FileProxyTest, CreateOrOpen_AbandonedCreate) { +- bool prev = ThreadRestrictions::SetIOAllowed(false); ++ bool prev = ThreadRestrictions::SetIOAllowed(true); + { + FileProxy proxy(file_task_runner()); + proxy.CreateOrOpen( +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/content/browser/browser_main_loop.cc qt5_b/src/3rdparty/chromium/content/browser/browser_main_loop.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/content/browser/browser_main_loop.cc 2015-10-13 06:36:47.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/content/browser/browser_main_loop.cc 2016-02-12 17:53:52.118534482 +0100 +@@ -745,7 +745,7 @@ + + // If the UI thread blocks, the whole UI is unresponsive. + // Do not allow disk IO from the UI thread. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + base::ThreadRestrictions::DisallowWaiting(); + return result_code_; + } +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/content/browser/browser_process_sub_thread.cc qt5_b/src/3rdparty/chromium/content/browser/browser_process_sub_thread.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/content/browser/browser_process_sub_thread.cc 2015-10-13 06:36:46.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/content/browser/browser_process_sub_thread.cc 2016-02-12 17:52:40.717701092 +0100 +@@ -39,7 +39,7 @@ + // Though this thread is called the "IO" thread, it actually just routes + // messages around; it shouldn't be allowed to perform any blocking disk + // I/O. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + base::ThreadRestrictions::DisallowWaiting(); + } + } +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/dbus/end_to_end_async_unittest.cc qt5_b/src/3rdparty/chromium/dbus/end_to_end_async_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/dbus/end_to_end_async_unittest.cc 2015-10-13 06:36:51.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/dbus/end_to_end_async_unittest.cc 2016-02-12 17:57:04.280777854 +0100 +@@ -39,7 +39,7 @@ + + virtual void SetUp() { + // Make the main thread not to allow IO. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + + // Start the D-Bus thread. + dbus_thread_.reset(new base::Thread("D-Bus Thread")); +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/dbus/object_manager_unittest.cc qt5_b/src/3rdparty/chromium/dbus/object_manager_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/dbus/object_manager_unittest.cc 2015-10-13 06:36:51.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/dbus/object_manager_unittest.cc 2016-02-12 17:54:33.659019384 +0100 +@@ -61,7 +61,7 @@ + + virtual void SetUp() { + // Make the main thread not to allow IO. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + + // Start the D-Bus thread. + dbus_thread_.reset(new base::Thread("D-Bus Thread")); +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/dbus/property_unittest.cc qt5_b/src/3rdparty/chromium/dbus/property_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/dbus/property_unittest.cc 2015-10-13 06:36:51.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/dbus/property_unittest.cc 2016-02-12 17:57:54.025358691 +0100 +@@ -51,7 +51,7 @@ + + virtual void SetUp() { + // Make the main thread not to allow IO. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + + // Start the D-Bus thread. + dbus_thread_.reset(new base::Thread("D-Bus Thread")); +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/dbus/signal_sender_verification_unittest.cc qt5_b/src/3rdparty/chromium/dbus/signal_sender_verification_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/dbus/signal_sender_verification_unittest.cc 2015-10-13 06:36:51.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/dbus/signal_sender_verification_unittest.cc 2016-02-12 17:55:57.519998395 +0100 +@@ -32,7 +32,7 @@ + base::StatisticsRecorder::Initialize(); + + // Make the main thread not to allow IO. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + + // Start the D-Bus thread. + dbus_thread_.reset(new base::Thread("D-Bus Thread")); +@@ -161,7 +161,7 @@ + void SafeServiceStop(TestService* test_service) { + base::ThreadRestrictions::SetIOAllowed(true); + test_service->Stop(); +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + } + + base::MessageLoop message_loop_; +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/net/base/file_stream_unittest.cc qt5_b/src/3rdparty/chromium/net/base/file_stream_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/net/base/file_stream_unittest.cc 2015-10-13 06:36:53.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/net/base/file_stream_unittest.cc 2016-02-12 18:00:05.358889970 +0100 +@@ -758,7 +758,7 @@ + scoped_refptr pool( + new base::SequencedWorkerPool(1, "StreamTest")); + +- bool prev = base::ThreadRestrictions::SetIOAllowed(false); ++ bool prev = base::ThreadRestrictions::SetIOAllowed(true); + scoped_ptr stream(new FileStream(pool.get())); + int flags = base::File::FLAG_OPEN | base::File::FLAG_WRITE | + base::File::FLAG_ASYNC; +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/net/base/network_config_watcher_mac.cc qt5_b/src/3rdparty/chromium/net/base/network_config_watcher_mac.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/net/base/network_config_watcher_mac.cc 2015-10-13 06:36:53.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/net/base/network_config_watcher_mac.cc 2016-02-12 18:00:56.359484236 +0100 +@@ -67,7 +67,7 @@ + void NetworkConfigWatcherMacThread::Init() { + // Disallow IO to make sure NetworkConfigWatcherMacThread's helper thread does + // not perform blocking operations. +- base::ThreadRestrictions::SetIOAllowed(false); ++ base::ThreadRestrictions::SetIOAllowed(true); + + delegate_->Init(); + +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/3rdparty/chromium/net/disk_cache/backend_unittest.cc qt5_b/src/3rdparty/chromium/net/disk_cache/backend_unittest.cc +--- qt5webengine-5.5.1/src/3rdparty/chromium/net/disk_cache/backend_unittest.cc 2015-10-13 06:36:53.000000000 +0200 ++++ qt5_b/src/3rdparty/chromium/net/disk_cache/backend_unittest.cc 2016-02-12 18:02:24.724514006 +0100 +@@ -463,7 +463,7 @@ + base::Thread::Options(base::MessageLoop::TYPE_IO, 0))); + net::TestCompletionCallback cb; + +- bool prev = base::ThreadRestrictions::SetIOAllowed(false); ++ bool prev = base::ThreadRestrictions::SetIOAllowed(true); + scoped_ptr cache(new disk_cache::BackendImpl( + cache_path_, cache_thread.task_runner(), NULL)); + int rv = cache->Init(cb.callback()); +@@ -1972,7 +1972,7 @@ + base::Thread::Options(base::MessageLoop::TYPE_IO, 0))); + + net::TestCompletionCallback cb; +- bool prev = base::ThreadRestrictions::SetIOAllowed(false); ++ bool prev = base::ThreadRestrictions::SetIOAllowed(true); + base::FilePath path(cache_path_); + int rv = disk_cache::CreateCacheBackend(net::DISK_CACHE, + net::CACHE_BACKEND_BLOCKFILE, +diff -aur '--exclude=*.pyc' '--exclude=*.o' '--exclude=*.h' '--exclude=*.a' '--exclude=*deps' '--exclude=*log*' '--exclude=*ninja*' '--exclude=*.gyp' '--exclude=*.pak' '--exclude=*.pickle' '--exclude=*.cache' '--exclude=*.py' '--exclude=*.idl' '--exclude=*.gypi' '--exclude=*.tmp' '--exclude=*.in' '--exclude=*.rc' qt5webengine-5.5.1/src/core/gl_surface_qt.cpp qt5_b/src/core/gl_surface_qt.cpp +--- qt5webengine-5.5.1/src/core/gl_surface_qt.cpp 2015-10-13 06:36:54.000000000 +0200 ++++ qt5_b/src/core/gl_surface_qt.cpp 2016-02-14 11:38:43.661776602 +0100 +@@ -513,15 +513,20 @@ + return NULL; + #endif + } +- case kGLImplementationEGLGLES2: { ++ case kGLImplementationEGLGLES2: { + scoped_refptr surface = new GLSurfaceQtEGL(size); + if (!surface->Initialize()) + return NULL; + return surface; + } +- default: +- Q_UNREACHABLE(); +- return NULL; ++ default: { ++ scoped_refptr surface = new GLSurfaceQtEGL(size); ++ if (!surface->Initialize()) ++ return NULL; ++ return surface; ++ } ++// Q_UNREACHABLE(); ++// return NULL; + } + } + diff --git a/package/qt5/qt5webengine/qt5webengine.__hash b/package/qt5/qt5webengine/qt5webengine.__hash new file mode 100644 index 0000000..b5ecd88 --- /dev/null +++ b/package/qt5/qt5webengine/qt5webengine.__hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.5/5.5.1/submodules/qtwebengine-opensource-src-5.5.1.tar.xz.mirrorlist +sha256 7c4d328dd305991aaf0c3450615f4a8e5d80152194bee6f5925bd8d3477e2b90 qtwebengine-opensource-src-5.5.1.tar.xz diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk new file mode 100644 index 0000000..98c67a6 --- /dev/null +++ b/package/qt5/qt5webengine/qt5webengine.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# qt5webengine +# +################################################################################ + +QT5WEBENGINE_VERSION = $(QT5_VERSION) +QT5WEBENGINE_SITE = $(QT5_SITE) +QT5WEBENGINE_SOURCE = qtwebengine-opensource-src-$(QT5WEBENGINE_VERSION).tar.xz +QT5WEBENGINE_DEPENDENCIES = qt5base qt5declarative qt5webchannel libcap openssl host-gperf +QT5WEBENGINE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBENGINE_LICENSE = GPLv3 with exception or LGPLv3 or GPLv2 +# Source files contain references to LGPL_EXCEPTION.txt but it is not included +# in the archive. +QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT LICENSE.GPLv3 LICENSE.LGPL3 +else +QT5WEBENGINE_LICENSE = Commercial license +QT5WEBENGINE_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5WEBENGINE_DEPENDENCIES += qt5declarative +endif + +define QT5WEBENGINE_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake WEBENGINE_CONFIG+=use_proprietary_codecs) +endef + +define QT5WEBENGINE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBENGINE_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5WEBENGINE_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtWebEngine $(TARGET_DIR)/usr/qml/ +endef +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5WEBENGINE_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webengine* $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +ifneq ($(BR2_STATIC_LIBS),y) +define QT5WEBENGINE_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebEngine*.so.* $(TARGET_DIR)/usr/lib + #cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qtwebengine $(TARGET_DIR)/usr/lib/qt/plugins/ + cp -dpf $(STAGING_DIR)/usr/libexec/QtWebEngineProcess $(TARGET_DIR)/usr/libexec/ + mkdir -p $(TARGET_DIR)/usr/translations/qtwebengine_locales + cp -dpfr $(STAGING_DIR)/usr/translations/qtwebengine_locales/* $(TARGET_DIR)/usr/translations/qtwebengine_locales/ + mkdir -p $(TARGET_DIR)/usr/resources + cp -dpfr $(STAGING_DIR)/usr/resources/* $(TARGET_DIR)/usr/resources/ +endef +endif + +define QT5WEBENGINE_INSTALL_TARGET_CMDS + $(QT5WEBENGINE_INSTALL_TARGET_LIBS) + $(QT5WEBENGINE_INSTALL_TARGET_QMLS) + $(QT5WEBENGINE_INSTALL_TARGET_EXAMPLES) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch b/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file mode 100644 index 0000000..b7b6791 --- /dev/null +++ b/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch @@ -0,0 +1,34 @@ +From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 22 Feb 2016 10:57:32 +0100 +Subject: [PATCH] Fix linking with libpthread + +WebKit use libpthread directly but is depending on other qt modules +causing it to be linked against, which might break unless -lpthread +is last. Instead just add it explicitly after the static libraries. + +Upstream-Status: Backport from 5.7 branch + +Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33 +Reviewed-by: Simon Hausmann +Signed-off-by: Jonathan Liu +Signed-off-by: Gary Bisson +--- + Tools/qmake/mkspecs/features/default_post.prf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf +index 67276b7..39bb3f7 100644 +--- a/Tools/qmake/mkspecs/features/default_post.prf ++++ b/Tools/qmake/mkspecs/features/default_post.prf +@@ -201,6 +201,7 @@ needToLink() { + linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir)) + LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs) + } ++ posix:!darwin: LIBS += -lpthread + } + + creating_module { +-- +2.7.1 + diff --git a/package/qt5/qt5webkit/Config.in b/package/qt5/qt5webkit/Config.in index 48aaf94..7add5f9 100644 --- a/package/qt5/qt5webkit/Config.in +++ b/package/qt5/qt5webkit/Config.in @@ -23,6 +23,6 @@ config BR2_PACKAGE_QT5WEBKIT http://qt.io comment "qt5webkit needs a toolchain w/ dynamic library" - depends on BR2_STATIC_LIBS - depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE - depends on !BR2_BINFMT_FLAT + depends on BR2_STATIC_LIBS + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on !BR2_BINFMT_FLAT diff --git a/package/qt5/qt5webkit/qt5webkit.hash b/package/qt5/qt5webkit/qt5webkit.hash index 96b8bdd..47e93c0 100644 --- a/package/qt5/qt5webkit/qt5webkit.hash +++ b/package/qt5/qt5webkit/qt5webkit.hash @@ -1,2 +1 @@ -# locally computed -sha256 bdd659573e7e75cd4ad57b7160a7353d98d21a6fef06e4fb9e114a5b1f1e9dab qt5webkit-b35917bcb44d7f200af0f4ac68a126fa0aa8d93d.tar.gz +sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk index 378cdf7..629e40a 100644 --- a/package/qt5/qt5webkit/qt5webkit.mk +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -4,13 +4,11 @@ # ################################################################################ -QT5WEBKIT_VERSION = b35917bcb44d7f200af0f4ac68a126fa0aa8d93d +QT5WEBKIT_VERSION = d2ff5a085572b1ee24dcb42ae107063f3142d14e # Using GitHub since it supports downloading tarballs from random commits. # The http://code.qt.io/cgit/qt/qtwebkit.git/ repo doesn't allow to do so. QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION)) -QT5WEBKIT_DEPENDENCIES = \ - host-bison host-flex host-gperf host-python host-ruby \ - qt5base sqlite +QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison host-flex QT5WEBKIT_INSTALL_STAGING = YES QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1 @@ -33,16 +31,6 @@ ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) QT5WEBKIT_DEPENDENCIES += qt5declarative endif -# QtWebkit's build system uses python, but only supports python2. We work -# around this by forcing python2 early in the PATH, via a python->python2 -# symlink. -QT5WEBKIT_ENV = PATH=$(@D)/host-bin:$(BR_PATH) -define QT5WEBKIT_PYTHON2_SYMLINK - mkdir -p $(@D)/host-bin - ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/host-bin/python -endef -QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK - # Since we get the source from git, generated header files are not included. # qmake detects that header file generation (using the syncqt tool) must be # done based on the existence of a .git directory (cfr. the git_build config @@ -51,15 +39,15 @@ QT5WEBKIT_PRE_CONFIGURE_HOOKS += QT5WEBKIT_PYTHON2_SYMLINK # create an empty .git directory. define QT5WEBKIT_CONFIGURE_CMDS mkdir -p $(@D)/.git - (cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(HOST_DIR)/usr/bin/qmake) + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) endef define QT5WEBKIT_BUILD_CMDS - $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef define QT5WEBKIT_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(QT5WEBKIT_ENV) $(MAKE) -C $(@D) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install $(QT5_LA_PRL_FILES_FIXUP) endef diff --git a/package/qt5/qt5websockets/qt5websockets.hash b/package/qt5/qt5websockets/qt5websockets.hash index 3443476..067bd6f 100644 --- a/package/qt5/qt5websockets/qt5websockets.hash +++ b/package/qt5/qt5websockets/qt5websockets.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtwebsockets-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 3cd9d4bbff8e6be5e252f00fc9ecb9ac2d8a193020288c7d1e82583daeb5ba35 qtwebsockets-opensource-src-5.6.2.tar.xz +sha256 741be11a907f82807a786e6a53ae7316c0b3864491b692e8719c381e0f158b43 qtwebsockets-opensource-src-5.7.0.tar.xz diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash index fa4e97f..f0f369d 100644 --- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash @@ -1,2 +1 @@ -# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.2/submodules/qtxmlpatterns-opensource-src-5.6.2.tar.xz.mirrorlist -sha256 7c6df3eebf188d8ce6822a22cebbc63da5ac27047cf1bd7236d5b988244782cc qtxmlpatterns-opensource-src-5.6.2.tar.xz +sha256 38882a4ea5d711be07d10695759359045f7f9d64727a65e1d5e6515d55c7e20b qtxmlpatterns-opensource-src-5.7.0.tar.xz diff --git a/package/ti-gfx/S80ti-gfx b/package/ti-gfx/S80ti-gfx index fc5999a..00f8394 100644 --- a/package/ti-gfx/S80ti-gfx +++ b/package/ti-gfx/S80ti-gfx @@ -3,14 +3,16 @@ start() { echo "ti-gfx: starting pvr driver" + TMPFB=`mktemp` + cat /dev/fb0 > $TMPFB BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" YRES="$(fbset | awk '/geom/ {print $3}')" # Set RGBA ordering to something the drivers like - if [ "$BITSPERPIXEL" = "32" ] ; then - fbset -rgba 8/16,8/8,8/0,8/24 - fi + #if [ "$BITSPERPIXEL" = "32" ] ; then + # fbset -rgba 8/16,8/8,8/0,8/24 + #fi # Try to enable triple buffering when there's enough VRAM - fbset -vyres $(( YRES*3 )) + #fbset -vyres $(( YRES*3 )) modprobe pvrsrvkm modprobe omaplfb @@ -22,6 +24,14 @@ start() { mknod /dev/pvrsrvkm c $pvr_maj 0 chmod 600 /dev/pvrsrvkm + #-- cursor off + echo -e "\033[?25l\033[9;0]\033[14;0]" > /dev/tty0 + # -- disa screensaver + echo 0 > /sys/class/graphics/fb0/blank + + cat $TMPFB > /dev/fb0 + rm $TMPFB + if ! /usr/bin/pvrsrvctl --start --no-module; then echo "ti-gfx: unable to start server" fi diff --git a/package/ti-gfx/powervr.ini b/package/ti-gfx/powervr.ini index 8d2d853..cceecdd 100644 --- a/package/ti-gfx/powervr.ini +++ b/package/ti-gfx/powervr.ini @@ -1,2 +1,4 @@ [default] -WindowSystem=libpvrPVR2D_FRONTWSEGL.so +#WindowSystem=libpvrPVR2D_FRONTWSEGL.so +WindowSystem=libpvrPVR2D_FLIPWSEGL.so +ParamBufferSize=16777216 diff --git a/package/ti-sgx-km/ti-sgx-km.mk b/package/ti-sgx-km/ti-sgx-km.mk index 48c8a6d..05e1cca 100644 --- a/package/ti-sgx-km/ti-sgx-km.mk +++ b/package/ti-sgx-km/ti-sgx-km.mk @@ -5,7 +5,8 @@ ################################################################################ # This correpsonds to SDK 02.00.00.00 -TI_SGX_KM_VERSION = 2b7523d07a13ab704a24a7664749551f4a13ed32 +#TI_SGX_KM_VERSION = 2b7523d07a13ab704a24a7664749551f4a13ed32 +TI_SGX_KM_VERSION = remotes/origin/ti-img-sgx/1.14.3699939/k4.4 TI_SGX_KM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-linux.git TI_SGX_KM_LICENSE = GPLv2 TI_SGX_KM_LICENSE_FILES = GPL-COPYING @@ -18,7 +19,7 @@ TI_SGX_KM_MAKE_OPTS = \ PVR_NULLDRM=1 ifeq ($(BR2_PACKAGE_TI_SGX_AM335X),y) -TI_SGX_KM_PLATFORM_NAME = omap335x +TI_SGX_KM_PLATFORM_NAME = omap else ifeq ($(BR2_PACKAGE_TI_SGX_AM437X),y) TI_SGX_KM_PLATFORM_NAME = omap437x else ifeq ($(BR2_PACKAGE_TI_SGX_AM4430),y) @@ -38,6 +39,8 @@ define TI_SGX_KM_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) $(TI_SGX_KM_MAKE_OPTS) \ DISCIMAGE=$(TARGET_DIR) \ kbuild_install -C $(@D)/$(TI_SGX_KM_SUBDIR) + echo ">>>>>>>>>" + sleep 10 endef $(eval $(generic-package)) diff --git a/package/ti-sgx-um/ti-sgx-um.mk b/package/ti-sgx-um/ti-sgx-um.mk index d5c50a0..76a7663 100644 --- a/package/ti-sgx-um/ti-sgx-um.mk +++ b/package/ti-sgx-um/ti-sgx-um.mk @@ -6,6 +6,7 @@ # This correpsonds to SDK 02.00.00.00 TI_SGX_UM_VERSION = e15f1543bab4de9e8927a2c4934addf3fd16ffcb +#TI_SGX_UM_VERSION = glsdk_7.04.00.03 TI_SGX_UM_SITE = git://git.ti.com/graphics/omap5-sgx-ddk-um-linux.git TI_SGX_UM_LICENSE = TI TSPA License TI_SGX_UM_LICENSE_FILES = OMAP5-Linux-Graphics-DDK-UM-Manifest.doc