From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Abhijit Ray Chaudhury <abhijit.ray.chaudhury@gmail.com>
Cc: libc-help <libc-help@sourceware.org>
Subject: Re: compiling glibc using -fasynchronous-unwind-tables for arm
Date: Wed, 15 Mar 2023 09:59:08 -0300 [thread overview]
Message-ID: <d5ea6a16-646b-3447-6e05-a8884ef1e6b1@linaro.org> (raw)
In-Reply-To: <CAACKNgW4uuPwm2an4CbSAaVCEti1noC=RxPoJx0FZYdOTXr0ig@mail.gmail.com>
On 15/03/23 05:36, Abhijit Ray Chaudhury wrote:
> HI Adhemerval,
>
> Thanks a lot for the response.
>
> If you look into the arm preconfgure.ac <http://preconfgure.ac> , (https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/arm/preconfigure.ac;h=a70738526311c0b0ed21b175eec0bee90c850025;hb=9e2ff880f3cbc0b4ec8505ad2ce4a1c92d7f6d56 <https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/arm/preconfigure.ac;h=a70738526311c0b0ed21b175eec0bee90c850025;hb=9e2ff880f3cbc0b4ec8505ad2ce4a1c92d7f6d56>) , you would notice :
>
> CFLAGS="$CFLAGS -fno-unwind-tables" or -fno-unwind-tables is getting added to the cflags during configure.
>
> This is conflicting with -fasynchronous-unwind-tables that I passed. And I am getting following error :
> =======================================================================================
>
> arm-linux-gnueabihf-gcc -march=armv7ve -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=/yocto/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc/linaro-2.25-r0/recipe-sysroot -isystem/opt/archive-pkgs/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/include -I/yocto/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc/linaro-2.25-r0/recipe-sysroot/usr/include -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/yocto/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc/linaro-2.25-r0=/usr/src/debug/glibc/linaro-2.25-r0 -fdebug-prefix-map=/yocto/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc/linaro-2.25-r0/recipe-sysroot= -fdebug-prefix-map=/yocto/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc/linaro-2.25-r0/recipe-sysroot-native= * -fasynchronous-unwind-tables -fno-unwind-tables * -L/opt/archive-pkgs/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/lib
> -Wl,-rpath-link,/opt/archive-pkgs/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -fno-stack-protector -o conftest
> conftest.c -static -nostartfiles -nostdlib
> 1>&5
> /tmp/ccbJ1zoJ.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> /tmp/ccbJ1zoJ.o:(.ARM.exidx.text.startup+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> /tmp/ccbJ1zoJ.o:(.ARM.exidx.text.exit+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> collect2: error: ld returned 1 exit status
> configure:5687: $? = 1
> configure:5707: error: missing __attribute__ ((constructor)) support??
> ======================================================================================
And I have tested with both:
CC="arm-glibc-linux-gnueabihf-gcc -fasynchronous-unwind-tables"
and
CC=arm-glibc-linux-gnueabihf-gcc CFLAGS="-O2 -fasynchronous-unwind-tables"
I also tested with gcc from ubuntu22 to check if this might something I haven't
enabled on my toolchain (since I don't build all languages), but again I did not
see any issue.
>
> I am interested to know your config.log after you built. Can you please share ?
Here it is using ubuntu arm cross compiler: https://pastebin.mozilla.org/MeOPhxdM
and here it is gcc-7: https://pastebin.mozilla.org/k0LjKfF6.
I also tested with gcc-7 and glibc 2.25 and again I did not see any configure or build
issue. I am not sure why your compiler is not disabling unwind-tables with an
explicit -fno-unwind-tables option.
next prev parent reply other threads:[~2023-03-15 12:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 10:04 Abhijit Ray Chaudhury
2023-03-14 9:18 ` Abhijit Ray Chaudhury
2023-03-14 18:47 ` Adhemerval Zanella Netto
2023-03-15 8:36 ` Abhijit Ray Chaudhury
2023-03-15 12:59 ` Adhemerval Zanella Netto [this message]
2023-03-15 14:20 ` Florian Weimer
2023-03-15 19:52 ` Adhemerval Zanella Netto
2023-03-16 10:59 ` Abhijit Ray Chaudhury
2023-03-17 13:37 ` Abhijit Ray Chaudhury
2023-03-20 17:00 ` Adhemerval Zanella Netto
2023-03-21 11:30 ` Abhijit Ray Chaudhury
2023-03-22 11:56 ` Adhemerval Zanella Netto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d5ea6a16-646b-3447-6e05-a8884ef1e6b1@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=abhijit.ray.chaudhury@gmail.com \
--cc=libc-help@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).