Thread overview
[Issue 18515] freebsd 11 ships with gcc unable to link 32 bit binaries, dmd uses it by default
Feb 24, 2018
Jonathan M Davis
Feb 24, 2018
Jonathan M Davis
Feb 24, 2018
Walter Bright
Feb 24, 2018
Jonathan M Davis
Feb 24, 2018
Brad Roberts
Feb 25, 2018
Jonathan M Davis
Dec 17, 2022
Iain Buclaw
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m

--- Comment #1 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Looking at the source code for the compiler, the only place I see that the CC environment variable is used is in src/dmd/link.d, and it looks like back in October, Martin changed it so that it uses cc if CC is not set, and if I have neither gcc nor g++ in my PATH on my 64-bit FreeBSD system, it compiles just fine. I know that that didn't used to be the case, but it appears to be so now - presumably thanks to Martin's changes to link.d. So, I don't know why the auto-tester would be trying to use gcc or g++. There is some logic in posix.mak where it tries to figure out whether clang or gcc is being used - primarily so that it can figure out which compiler flags to use, I think. Glancing over it, it looks like it uses c++ --version to figure that out, though if HOST_CXX is set, it uses that instead of c++, and it might use CXX if that's set. So, maybe the problem with the auto-tester relates to the makefile somehow? Certainly, from what I can tell, the issue is not as simple as dmd using gcc by default now if CC isn't set.

Does the environment for the autoster have CC, CXX, HOST_CC, or HOST_CXX set to gcc or g++?

--
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #2 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
However, it does look like test/d_do_test.d hardcodes g++ if CC isn't set, so that fails if g++ isn't available.

--
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
Yes, the dmd code:

https://github.com/dlang/dmd/blob/master/src/dmd/link.d#L420

shows that dmd is simply reading the CC environment variable. So it's something else that is setting CC to gcc.

--
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #4 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
https://github.com/dlang/dmd/pull/7949

--
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/0527f4eef35b56afd67c65382a0e395d86db93f4 issue 18515: Fix it so that neither g++ nor CC is required.

It was previously fixed so that cc is used if CC isn't set when compiling dmd, but the test suite still had g++ hardcoded, so if the system was set up with clang and not gcc, the dmd test suite barfed midway through. This fixes it so that it uses c++ if CC isn't set instead of using g++.

https://github.com/dlang/dmd/commit/bd2465510a172414cc626f7d7ebc3d0db8aece3f Merge pull request #7949 from jmdavis/issue_18515

issue 18515: Fix it so that neither g++ nor CC is required.

--
February 24, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #6 from Brad Roberts <braddr@puremagic.com> ---
I wasn't thinking about this last night, but the behavior that's in question isn't master or stable branch, but rather 2.068.2.  That compiler's behavior is where things are going wrong.  The problem, as far as the auto-tester is concerned, has been worked around sufficiently.  I'm not sure if there's any remaining issues with the tip of tree builds.

--
February 25, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #7 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Well, I'm able to build and run the tests for Phobos, druntime, and dmd without having gcc installed on a 64-bit FreeBSD 11.1 system. I'd guess that that works for 32-bit as well (aside from the test failures that are being worked through), but I don't know. 2.068.2 certainly won't work that way though.

--
April 06, 2018
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #8 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/5f4d97ce92f7715d71dc53724ae655f3060c542b issue 18515: Fix it so that neither g++ nor CC is required.

It was previously fixed so that cc is used if CC isn't set when compiling dmd, but the test suite still had g++ hardcoded, so if the system was set up with clang and not gcc, the dmd test suite barfed midway through. This fixes it so that it uses c++ if CC isn't set instead of using g++.

https://github.com/dlang/dmd/commit/77b3d453a49f908e0e09e192852c198dc4c3787f Merge pull request #8012 from wilzbach/fix-win32-64-stable

[stable] issue 18515: Fix it so that neither g++ nor CC is required.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=18515

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
December 13
https://issues.dlang.org/show_bug.cgi?id=18515

--- Comment #9 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19398

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--