diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2011-01-26 04:19:58 +0000 |
---|---|---|
committer | Dave Korn <davek@gcc.gnu.org> | 2011-01-26 04:19:58 +0000 |
commit | 58c741a62e5f940a8e6f26b3154eebed3c03a466 (patch) | |
tree | 5baaf71e1160b38141e3ca33b23497cde91da050 /gcc/config | |
parent | a7150b3d881e4386649de951cf314d9e9a86fc20 (diff) | |
download | gcc-58c741a62e5f940a8e6f26b3154eebed3c03a466.zip gcc-58c741a62e5f940a8e6f26b3154eebed3c03a466.tar.gz gcc-58c741a62e5f940a8e6f26b3154eebed3c03a466.tar.bz2 |
re PR target/40125 (libgcc_s DLL installed in wrong directory in cross toolchain)
gcc/ChangeLog:
PR target/40125
* config.gcc (i[34567]86-*-pe | i[34567]86-*-cygwin*): Select suitable
t-dlldir{,-x} fragment for build and add it to tmake_file.
(i[34567]86-*-mingw* | x86_64-*-mingw*): Likewise.
* Makefile.in (libgcc.mvars): Also export SHLIB_DLLDIR to libgcc.
* config/i386/t-dlldir: New file.
(SHLIB_DLLDIR): Define.
* config/i386/t-dlldir-x: New file.
(SHLIB_DLLDIR): Define.
* config/i386/t-cygming: Error out if SHLIB_DLLDIR is not set.
(SHLIB_INSTALL): Use it.
libgcc/ChangeLog:
PR target/40125
* configure.ac: Call ACX_NONCANONICAL_TARGET.
(toolexecdir): Calculate and AC_SUBST.
(toolexeclibdir): Likewise.
* Makefile.in (target_noncanonical): Import.
(toolexecdir): Likewise.
(toolexeclibdir): Likewise.
* configure: Regenerate.
From-SVN: r169274
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/t-cygming | 10 | ||||
-rw-r--r-- | gcc/config/i386/t-dlldir | 6 | ||||
-rw-r--r-- | gcc/config/i386/t-dlldir-x | 9 |
3 files changed, 23 insertions, 2 deletions
diff --git a/gcc/config/i386/t-cygming b/gcc/config/i386/t-cygming index 6d54e49..ccae237 100644 --- a/gcc/config/i386/t-cygming +++ b/gcc/config/i386/t-cygming @@ -72,6 +72,11 @@ SHLIB_MAP = @shlib_map_file@ SHLIB_OBJS = @shlib_objs@ SHLIB_DIR = @multilib_dir@/shlib SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +# SHLIB_DLLDIR is defined by including one of either t-dlldir or t-dlldir-x +# (native/cross build respectively) in the tmake_file list in gcc/config.gcc. +ifndef SHLIB_DLLDIR +$(error SHLIB_DLLDIR must be defined) +endif SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \ if [ ! -d $(SHLIB_DIR) ]; then \ @@ -91,9 +96,10 @@ SHLIB_LINK = $(LN_S) -f $(SHLIB_MAP) $(SHLIB_MAP).def && \ # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. SHLIB_INSTALL = \ - $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ + $$(mkinstalldirs) $$(DESTDIR)$$(SHLIB_DLLDIR) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ $(INSTALL) $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $$(DESTDIR)$$(bindir)/$(SHLIB_SONAME); \ + $$(DESTDIR)$$(SHLIB_DLLDIR)/$(SHLIB_SONAME); \ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_IMPLIB) \ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_IMPLIB) SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk diff --git a/gcc/config/i386/t-dlldir b/gcc/config/i386/t-dlldir new file mode 100644 index 0000000..a3e0331 --- /dev/null +++ b/gcc/config/i386/t-dlldir @@ -0,0 +1,6 @@ + +# In a native build, target DLLs go in bindir, where they can be executed. +# Note double quoting to prevent variables from being evaluated until install +# time; we don't want to expand them during libgcc.mvars generation. + +SHLIB_DLLDIR = $$(bindir) diff --git a/gcc/config/i386/t-dlldir-x b/gcc/config/i386/t-dlldir-x new file mode 100644 index 0000000..07dd845 --- /dev/null +++ b/gcc/config/i386/t-dlldir-x @@ -0,0 +1,9 @@ + +# In a cross build, bindir contains host not target binaries, so target DLLs +# instead go in toolexeclibdir, alongside other target binaries and static libs. +# Note double quoting to prevent variables from being evaluated until install +# time; we don't want to expand them during libgcc.mvars generation, and in +# any case, $toolexeclibdir is not defined in the gcc/ subdirectory, only in +# target lib directories. + +SHLIB_DLLDIR = $$(toolexeclibdir) |