This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64] Fall back to -fPIC if no support of -fpic relocation modifer in assembler


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]