gcc-4.6: "ld: warning: -fwritable-strings not compatible with literal CF/NSString"

Anatol Pomozov anatol.pomozov at gmail.com
Sat Mar 5 07:04:20 PST 2011


Hi

On Sat, Mar 5, 2011 at 4:51 AM, Rainer Müller <raimue at macports.org> wrote:
> On 2011-03-05 03:37 , Anatol Pomozov wrote:
>> It makes me think that this is an issue with GCC. So I filed a bug
>> against GCC http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47997 (that
>> bug has a repro case).
>>
>> Bug the GCC teams says that -fwritable-strings has been removed from
>> FSF gcc since 2004.
>
> The warning appears to come from ld. See the source here:
>
> http://www.opensource.apple.com/source/ld64/ld64-97.14/src/ld/MachOReaderRelocatable.hpp
>
> If it does compile with gcc 4.5, you should compare the sections and
> segments using otool(1) to see what makes the difference.

Unfortunately this example cannot be compiled with gcc-mp-4.5 because
of this bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44981 . That
is why I try to use unreleased 4.6 version where this bug is fixed.

4.5 version is almost unusable for macosx specific code compilation.
BTW does it make sense to backport the fix to 4.5?


More information about the macports-users mailing list