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: [PATCH] PR rtl-optimization/32219: optimizer causes wrong code in pic/hidden/weak symbol checking


On Fri, Feb 6, 2015 at 1:31 PM, Jack Howarth <howarth.at.gcc@gmail.com> wrote:
> H.J.,
>     On x86_64-apple-darwin14, your patch applied to r220481 results in...
>
> FAIL: gcc.dg/visibility-22.c (test for excess errors)
> FAIL: gcc.dg/visibility-23.c scan-hidden private_extern[ \t_]*_?foo
>
> with...
>
> Executing on host:
> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc
> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/
> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-22.c
>  -fno-diagnostics-show-caret -fdiagnostics-color=never   -fPIC  -lm
> -m32  -o ./visibility-22.exe    (timeout = 300)
> spawn -ignore SIGHUP
> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc
> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/
> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-22.c
> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -lm -m32
> -o ./visibility-22.exe^M
> Undefined symbols for architecture i386:^M
>   "_foo", referenced from:^M
>       _main in ccMD1qjz.o^M
>       _main in ccMD1qjz.o^M
> ld: symbol(s) not found for architecture i386^M
> collect2: error: ld returned 1 exit status^M
> compiler exited with status 1
> output is:
> Undefined symbols for architecture i386:^M
>   "_foo", referenced from:^M
>       _main in ccMD1qjz.o^M
>       _main in ccMD1qjz.o^M
> ld: symbol(s) not found for architecture i386^M
> collect2: error: ld returned 1 exit status^M
>
> FAIL: gcc.dg/visibility-22.c (test for excess errors)
>
> Executing on host:
> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc
> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/
> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-23.c
>  -fno-diagnostics-show-caret -fdiagnostics-color=never   -fPIC -S
> -m32  -o visibility-23.s    (timeout = 300)
> spawn -ignore SIGHUP
> /sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/xgcc
> -B/sw/src/fink.build/gcc50-5.0.0-1000/darwin_objdir/gcc/
> /sw/src/fink.build/gcc50-5.0.0-1000/gcc-5-20150206/gcc/testsuite/gcc.dg/visibility-23.c
> -fno-diagnostics-show-caret -fdiagnostics-color=never -fPIC -S -m32 -o
> visibility-23.s^M
> PASS: gcc.dg/visibility-23.c (test for excess errors)
> FAIL: gcc.dg/visibility-23.c scan-hidden private_extern[ \t_]*_?foo
>

Does Darwin support undefined hidden weak symbol?
Can you compile and gcc/testsuite/gcc.dg/visibility-22.c
with clang on Darwin?

-- 
H.J.


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