[patch, nios2] Fix PR78357, adjust sync builtin initialization

Jeff Law law@redhat.com
Thu Nov 24 15:31:00 GMT 2016


On 11/23/2016 11:57 PM, Sebastian Huber wrote:
> Hello Jeff,
>
> On 23/11/16 23:28, Jeff Law wrote:
>> On 11/16/2016 02:53 AM, Chung-Lin Tang wrote:
>>> This patch adjusts the initialization of __sync built-in functions:
>>> instead of conditionalizing on TARGET_LINUX_ABI, directly place the
>>> target-hook #define in config/nios2/linux.h.  This appears to be in line
>>> with other similar ports, e.g. m68k.
>>>
>>> Sebastian, this should solve your issue of not wanting __sync_* libcalls
>>> generated on RTEMS (which also uses TARGET_LINUX_ABI due to TLS
>>> support),
>>> can you verify it works for you?
>>>
>>> Chung-Lin
>>>
>>>     PR target/78357
>>>     * config/nios2/nios2.c (nios2_init_libfuncs): Remove
>>> TARGET_LINUX_ABI
>>>     condition.
>>>     (TARGET_INIT_LIBFUNCS): Delete definition and...
>>>     * config/nios2/linux.h (TARGET_INIT_LIBFUNCS): ...move to here, add
>>>     comments.
>>>
>> I fear you may have botched this;
>>
>> g++ -fno-PIE -c   -g  -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE
>> -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall
>> -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute
>> -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
>> -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I.
>> -I/home/law/gcc-testing/gcc/gcc -I/home/law/gcc-testing/gcc/gcc/.
>> -I/home/law/gcc-testing/gcc/gcc/../include
>> -I/home/law/gcc-testing/gcc/gcc/../libcpp/include
>> -I/opt/cfarm/mpc/include
>> -I/home/law/gcc-testing/gcc/gcc/../libdecnumber
>> -I/home/law/gcc-testing/gcc/gcc/../libdecnumber/dpd -I../libdecnumber
>> -I/home/law/gcc-testing/gcc/gcc/../libbacktrace   -o nios2.o -MT
>> nios2.o -MMD -MP -MF ./.deps/nios2.TPo
>> /home/law/gcc-testing/gcc/gcc/config/nios2/nios2.c
>> /home/law/gcc-testing/gcc/gcc/config/nios2/nios2.c:3608:1: error:
>> ‘void nios2_init_libfuncs()’ defined but not used
>> [-Werror=unused-function]
>>  nios2_init_libfuncs (void)
>
> in my build this was only a warning. How do you enable the -Werror for
> the GCC build? Is this the normal way to build GCC?
--enable-werror-always

It's standard for builds using config-list.mk, which some of us use for 
wide target testing.

jeff



More information about the Gcc-patches mailing list