On Fri, Feb 6, 2015 at 5:51 PM, Jack Howarth <howarth.at....@gmail.com> wrote: > H.J., > This patch also seems to be causing a huge number of regressions > in the g++ test suite due to linkage warnings on darwin of the form... > > ld: warning: direct access in Model::~Model() to global weak symbol > vtable for Model means the weak symbol cannot be overridden at > runtime. This was likely caused by different translation units being > compiled with different visibility settings.
Can you try my new patch? > Can this change wait until stage1? > Jack > > On Fri, Feb 6, 2015 at 4:41 PM, H.J. Lu <hjl.to...@gmail.com> wrote: >> On Fri, Feb 6, 2015 at 1:31 PM, Jack Howarth <howarth.at....@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. -- H.J.