This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [AArch64] Fall back to -fPIC if no support of -fpic relocation modifer in assembler
- From: Jiong Wang <jiong dot wang at arm dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Jun 2015 09:30:55 +0100
- Subject: Re: [AArch64] Fall back to -fPIC if no support of -fpic relocation modifer in assembler
- Authentication-results: sourceware.org; auth=none
- References: <n997fqmit0f dot fsf at arm dot com> <mvmbnfxy88s dot fsf at hawking dot suse dot de>
Andreas Schwab writes:
> Jiong Wang <jiong.wang@arm.com> writes:
>
>> gcc/
>> * configure.ac: Add check for aarch64 assembler -fpic relocation
>> modifier support.
>> * configure: Regenerate.
>> * config.in: Regenerate.
>> * config/aarch64/aarch64.c (initialize_aarch64_code_model): Fall back to
>> -fPIC if not support of -fpic relocation modifier in assembler.
>
> This fixes all testsuite regressions except this one:
>
> gcc.target/aarch64/pic-small.c scan-assembler-times adrp\tx[0-9]+,
> _GLOBAL_OFFSET_TABLE 2
Thanks for testing.
We need another dejagnu check, something like
"check_effective_target_fpic", to restrict this testcase only tested
when -fpic supported.
But the problem is the existed "check_effective_target_fpic" assume if
-fpic not supported, then warning will be issued in compile stage, while
on AArch64, if -fpic is not supported, we will not issue warning, we
just fall back to -fPIC.
What I can think of to fix this is add a new check
"check_effective_target_fpic_asm" which check whether those new
relocation types are supported by binutils, I don't have any other
better idea, and this will be a seperate patch.
So, is this patch OK for trunk?
--
Regards,
Jiong