Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 244 - cc1: warning: command line option ‘-fversion=Shared’ is valid for D but not for C
Summary: cc1: warning: command line option ‘-fversion=Shared’ is valid for D but not f...
Status: RESOLVED FIXED
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: development
Hardware: All All
: --- normal
Assignee: Johannes Pfau
URL:
Depends on:
Blocks:
 
Reported: 2016-10-05 21:24 CEST by Iain Buclaw
Modified: 2016-10-08 08:07 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Buclaw 2016-10-05 21:24:25 CEST
It seems that libtool passes the same D command-line options to gcc that it does for gdc when building libphobos/libdruntime.
Comment 1 Johannes Pfau 2016-10-06 07:22:14 CEST
This happens for non-D sources compiled into the libgdruntime.la and libgphobos.la libraries. libtool is correct here though, this is an automake problem:

If a language has full automake support, automake detects the extension and sets --tag=language when calling libtool. As we don't have that kind of support (requires modifying the automake perl? scripts which can only be done in the automake source code) we have to overwrite the tag detection with

libgdruntime_la_LIBTOOLFLAGS = --tag=D

But this then applies to all sources and causes libtool to use the D setup for .S and .c sources as well.

To solve this we have to remove all D sources from _SOURCES, add the .d.lo 'LOBJECTS' to _DEPENDENCIES and _LIBADD and remove the _LIBTOOLFLAGS = --tag=D line. (Similar to the way we already handle the unit test libraries).

We already have a (unused?) .d.lo rule in d_rules.am which should work.
Comment 2 Johannes Pfau 2016-10-06 08:24:29 CEST
I'll take a look a this. Iain, could you please have another look at https://bugzilla.gdcproject.org/show_bug.cgi?id=235 ? AFAICS this is the last blocker for a new binary release.
Comment 3 Johannes Pfau 2016-10-06 09:54:47 CEST
https://github.com/D-Programming-GDC/GDC/pull/249