On Tue, Sep 12, 2017 at 11:48 AM, Aaron Sawdey
<acsaw...@linux.vnet.ibm.com> wrote:
> On Tue, 2017-09-12 at 16:20 +0000, Joseph Myers wrote:
>> On Mon, 28 Aug 2017, H.J. Lu wrote:
>>
>> > Here is the updated patch.   OK for trunk?
>>
>> OK.
>
> This seems to be causing an issue for me on powerpc:
>
> /home/sawdey/src/gcc/trunk/build/./prev-gcc/xg++ 
> -B/home/sawdey/src/gcc/trunk/build/./prev-gcc/ 
> -B/home/sawdey/install/gcc/trunk_str/powerpc64le-unknown-linux-gnu/bin/ 
> -nostdinc++ 
> -B/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
>  
> -B/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
>   
> -I/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include/powerpc64le-unknown-linux-gnu
>   
> -I/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/include
>   -I/home/sawdey/src/gcc/trunk/trunk/libstdc++-v3/libsupc++ 
> -L/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/src/.libs
>  
> -L/home/sawdey/src/gcc/trunk/build/prev-powerpc64le-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
>  -c   -g -O2 -gtoggle -DIN_GCC     -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 -DGENERATOR_FILE -fno-PIE -I. -Ibuild 
> -I../../trunk/gcc -I../../trunk/gcc/build -I../../trunk/gcc/../include  
> -I../../trunk/gcc/../libcpp/include  \
>                 -o build/gencheck.o ../../trunk/gcc/gencheck.c
> In file included from ./tm.h:30:0,
>                  from ../../trunk/gcc/gencheck.c:23:
> ../../trunk/gcc/config/rs6000/sysv4.h:819:0: error: "LINK_EH_SPEC" redefined 
> [-Werror]
>  # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
>
> In file included from ./tm.h:28:0,
>                  from ../../trunk/gcc/gencheck.c:23:
> ../../trunk/gcc/config/gnu-user.h:135:0: note: this is the location of the 
> previous definition
>  #define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
>
> I don't see the problem on 252033.
>

There are several problems in rs6000/sysv4.h:

1. It doesn't undef LINK_EH_SPEC before define it.
2. It shouldn't define it for Linux since it has been defined in
gnu-user.h.   You didn't see the problem since there were the
same before my patch.

Can you not define LINK_EH_SPEC for Linux targets?


-- 
H.J.

Reply via email to