On Wed, 17 Dec 2014 17:04:08 +0000 Nicholas Clifton <ni...@redhat.com> wrote:
> Hang on - you say that you are getting this message during > *linking* ? The error message comes from the compiler, not the > linker, so why is it turning up in the linker's output ? Do you have > LTO enabled ? (If you do, does disabling LTO make the problem go > away ?) > Yes, The error only happens with -flto enabled, disabling -flto makes the error disappear. (but "NOT using -flto" also increases the resulting code size by a quite significant factor, so that's unfortunately not a solution) No other optimization flags are needed to reproduce the error. No linker flags need to be enabled explicitly either. I could reproduce the issue by simply compiling all files with: > msp430-elf-gcc -Wall -g -c -O0 -flto file.c -o file.o (this does not cause any errors) and then linking them with > msp430-elf-gcc *.o -o file.elf (this does cause the errors) Once the errors start appearing, there are always LOTS of them, but they always have one of the following forms: variant 1: > myfile.c: In function ‘xy’: > myfile.c:88:1: warning: visibility attribute not supported in this > configuration; ignored [-Wattributes] > } > ^ where the error always point to the line with the closing bracket at the end of a function. This is repeated for many functions throughout the codebase (hundreds) but interestingly not all functions used. I could not find out why this would appear for one function and not for another. for example I haven't seen this appear at the end of main() {} variant 2: > At top level: > lto1: warning: visibility attribute not supported in this configuration; > ignored [-Wattributes] > lto1: warning: visibility attribute not supported in this configuration; > ignored [-Wattributes] > lto1: warning: visibility attribute not supported in this configuration; > ignored [-Wattributes] > lto1: warning: visibility attribute not supported in this configuration; > ignored [-Wattributes] > lto1: warning: visibility attribute not supported in this configuration; > ignored [-Wattributes] ... (repeated a hundred times) cheers Eric ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users