RFC: Pay-as-you-go, Portable D Runtime for Microcontrollers (and maybe more)
Mike via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 6 01:32:00 PDT 2015
On Wednesday, 6 May 2015 at 07:20:38 UTC, Johannes Pfau wrote:
>>
>> What I would like to see, however, is a friendly compiler
>> error like "This platform does not support thread-local
>> storage. Please decorate your global variables with
>> __gshared." rather than "undefined reference '_d_get_address'"
>> from the linker.
>>
>>
>> Mike
>
> That's easy:
> https://github.com/D-Programming-microD/GDC/commit/d5677e03f40f4eb548e520728c5071a0b4445d24
>
> (Well, the error message could be a little bit friendlier ;-)
You know, that fork of yours has some really interesting stuff in
it :0
The -ftls-support option would be really great, but I'd call it
-fno-tls :)
I think such an option would be most useful at configure-time.
That is, if GDC is configured with --disable-tls or
--disable-threads, then -fno-tls is ON by default. That way it's
more a definition of the target platform than user choice.
And now that I think of it, tying some of those compiler options
to the configure options might be a better way to define platform
support rather than reading .di files or enums from a special
"configuration" module.
Mike
More information about the Digitalmars-d
mailing list