[OE-core] [PATCH 1/3] glibc: Upgrade to 2.23

Khem Raj raj.khem at gmail.com
Tue Mar 29 02:16:00 UTC 2016


> On Mar 28, 2016, at 6:38 PM, ChenQi <Qi.Chen at windriver.com> wrote:
> 
> On 02/23/2016 06:31 AM, Andre McCurdy wrote:
>> On Sat, Feb 20, 2016 at 12:07 AM, Khem Raj <raj.khem at gmail.com> wrote:
>>> Drop kconfig and options-group support
>>> Forward port cross-localedef support
>>> Assume ssp support in libc when building gcc-initial
>> Breaks for me when building for x86 with -Os (building with
>> -O1/-O2/-O3 are all OK):
>> 
>> i686-rdk-linux-gcc  -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse
>> --sysroot=/home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/vbox32-tcbootstrap
>> ../sysdeps/unix/sysv/linux/posix_fallocate.c -c -std=gnu11
>> -fgnu89-inline  -Os -Wall -Werror -Wno-error -Wundef -Wwrite-strings
>> -fdebug-prefix-map=/home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/vbox32=
>> -fdebug-prefix-map=/home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/x86_64-linux=
>> -fdebug-prefix-map=/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux=/usr/src/glibc
>> -fdebug-prefix-map=/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/git=/usr/src/glibc
>> -feliminate-unused-debug-types -fmerge-all-constants -frounding-math
>> -g -pipe -Wstrict-prototypes -Wold-style-definition   -Wa,-mtune=i686
>> -fexceptions  -ftls-model=initial-exec      -I../include
>> -I/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux/io
>>  -I/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux
>>  -I../sysdeps/unix/sysv/linux/i386/i686  -I../sysdeps/i386/i686/nptl
>> -I../sysdeps/unix/sysv/linux/i386  -I../sysdeps/unix/sysv/linux/x86
>> -I../sysdeps/i386/nptl  -I../sysdeps/unix/sysv/linux/include
>> -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread
>> -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv
>> -I../sysdeps/unix/i386  -I../sysdeps/unix  -I../sysdeps/posix
>> -I../sysdeps/i386/i686/fpu/multiarch  -I../sysdeps/i386/i686/fpu
>> -I../sysdeps/i386/i686/multiarch  -I../sysdeps/i386/i686
>> -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu/include
>> -I../sysdeps/x86/fpu  -I../sysdeps/i386  -I../sysdeps/x86
>> -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/ldbl-96
>> -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32
>> -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.
>> -nostdinc -isystem
>> /home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/x86_64-linux/usr/bin/i686-rdk-linux.gcc-cross-initial-i686/../../lib/i686-rdk-linux.gcc-cross-initial-i686/gcc/i686-rdk-linux/5.3.0/include
>> -isystem /home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/x86_64-linux/usr/bin/i686-rdk-linux.gcc-cross-initial-i686/../../lib/i686-rdk-linux.gcc-cross-initial-i686/gcc/i686-rdk-linux/5.3.0/include-fixed
>> -isystem /home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/vbox32/usr/include
>>  -D_LIBC_REENTRANT -include
>> /home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux/libc-modules.h
>> -DMODULE_NAME=libc -include ../include/libc-symbols.h       -o
>> /home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux/io/posix_fallocate.o
>> -MD -MP -MF /home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux/io/posix_fallocate.o.dt
>> -MT /home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/glibc/2.23-r0/build-i686-rdk-linux/io/posix_fallocate.o
>> ../sysdeps/unix/sysv/linux/posix_fallocate.c: In function 'posix_fallocate':
>> ../sysdeps/unix/sysv/linux/posix_fallocate.c:39:1: error: bp cannot be
>> used in asm here
>>  }
>>  ^
>> ../sysdeps/unix/sysv/linux/posix_fallocate.c:39:1: error: bp cannot be
>> used in asm here
> 
> 
> Hi All,
> 
> For the latest master, if 'DEBUG_BUILD' is enabled, the above error appers.
> 
> | ../sysdeps/unix/sysv/linux/posix_fallocate.c: In function 'posix_fallocate':
> | ../sysdeps/unix/sysv/linux/posix_fallocate.c:39:1: error: bp cannot be used in asm here
> |  }
> |  ^
> 
> The problem could be reproduced if we add in local.conf the following line.
> DEBUG_BUILD = "1"
> 
> Do you have any idea what's going on there?

posix_fallocate is calling a syscall helper with 6 argument, and there has been i386 specific optimization added to glibc
which checks for gcc version and if its >= 5.0 then relies upon gcc to do right thing when spilling ebp, and switched to using
inline syscall handler. But this spill is working/tested with -O2 and everything else is just a bonus if it works. Can you try this
patch to glibc  ?


--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -46,7 +46,7 @@
    to compile glibc.  Disable GCC 5 optimization when compiling for
    profiling since asm ("ebp") can't be used to put the 6th argument
    in %ebp for syscall.  */
-#if __GNUC_PREREQ (5,0) && !defined PROF
+#if __GNUC_PREREQ (5,0) && !defined PROF && !defined __OPTIMIZE_SIZE__
 # define OPTIMIZE_FOR_GCC_5
 #endif




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160328/f1df0169/attachment-0002.sig>


More information about the Openembedded-core mailing list