diff options
author | Joel Holdsworth <jholdsworth@nvidia.com> | 2022-02-24 15:06:28 +0000 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-05-11 20:25:42 +1200 |
commit | da1ffd041276ad87787be0c5cbcd7841082e3619 (patch) | |
tree | 4e8b2da4a6a2d1ac1e9c9194bb22c3cd633c4100 /packages/gcc-oracle/git-dbf713b5/0001-Fix-compiler-error.patch | |
parent | 3ac6f1791af77b682b1de4ad56157653aa566417 (diff) | |
download | crosstool-ng-da1ffd041276ad87787be0c5cbcd7841082e3619.tar.gz crosstool-ng-da1ffd041276ad87787be0c5cbcd7841082e3619.tar.bz2 crosstool-ng-da1ffd041276ad87787be0c5cbcd7841082e3619.zip |
cc/gcc: Remove -lstdc++ and -lm from gcc LDFLAGS
In Bryan Hundven's patch 1ad439907 from 2010, the author added -lstdc++
and -lm to the host gcc build's LDFLAGS, because at the time the linker
did not correctly include these libraries causing the build to fail.
In modern builds, this causes a problem for canadian gcc builds where
the host machine is mingw32-w64 Windows.
Within the gcc build there is the liblto_plugin module. On Windows this
must be built as the "liblto_plugin.dll" dynamic library. However,
libtool cannot produce a dynamic library unless every library dependency
is also a dynamic library, and falls back to producing a libstdc++.a
static library. liblto_plugin does not require libstdc++ - it
does not contain any C++ code, and the dependency would usually be
elided by the linker.
Unfortunately, in this case, crosstool-ng will never build a
libstdc++.dll dynamic library - only a libstdc++.a static library.
Therefore, there will never be a dynamic library version of stdc++ for
libtool to load and then discard.
This patch corrects the issue by removing "-lstdc++" from LDFLAGS,
because modern versions of gcc are able to correctly include libstdc++
where necessary. It also remove "-lm" for similar reasons.
Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
Diffstat (limited to 'packages/gcc-oracle/git-dbf713b5/0001-Fix-compiler-error.patch')
0 files changed, 0 insertions, 0 deletions