Skip to content

Commit 0627076

Browse files
giordanomaleadt
authored andcommitted
Put mingw32 *.a files in private_libdir (#51698)
This avoid that these files are picked up during julia's build process, and are instead only used to link pkgimages, as intended. Co-authored-by: Tim Besard <tim.besard@gmail.com> (cherry picked from commit 4ef353c)
1 parent 6407c33 commit 0627076

File tree

6 files changed

+117
-104
lines changed

6 files changed

+117
-104
lines changed

Make.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SP
12331233
# shipped with CSL. Although we do not depend on any of the symbols, it is entirely
12341234
# possible that a user might choose to install a library which depends on symbols provided
12351235
# by a newer libstdc++. Without runtime detection, those libraries would break.
1236-
CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.31|GLIBCXX_3\.5\.|GLIBCXX_4\.
1236+
CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.33|GLIBCXX_3\.5\.|GLIBCXX_4\.
12371237

12381238

12391239
# This is the set of projects that BinaryBuilder dependencies are hooked up for.

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,13 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
281281
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
282282
-$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
283283
endif
284+
-$(INSTALL_M) $(wildcard $(build_private_libdir)/*.a) $(DESTDIR)$(private_libdir)/
284285

285-
# We have a single exception; we want 7z.dll to live in private_libexecdir, not bindir, so that 7z.exe can find it.
286+
# We have a single exception; we want 7z.dll to live in private_libexecdir,
287+
# not bindir, so that 7z.exe can find it.
286288
-mv $(DESTDIR)$(bindir)/7z.dll $(DESTDIR)$(private_libexecdir)/
287289
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
288290
-$(INSTALL_M) $(build_libdir)/libssp.dll.a $(DESTDIR)$(libdir)/
289-
# The rest are compiler dependencies, as an example memcpy is exported by msvcrt
290-
# These are files from mingw32 and required for creating shared libraries like our caches.
291-
-$(INSTALL_M) $(build_libdir)/libgcc_s.a $(DESTDIR)$(libdir)/
292-
-$(INSTALL_M) $(build_libdir)/libgcc.a $(DESTDIR)$(libdir)/
293-
-$(INSTALL_M) $(build_libdir)/libmsvcrt.a $(DESTDIR)$(libdir)/
294291
else
295292

296293
# Copy over .dSYM directories directly for Darwin

base/linking.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ else
150150
end
151151

152152
function link_image_cmd(path, out)
153-
LIBDIR = "-L$(libdir())"
154153
PRIVATE_LIBDIR = "-L$(private_libdir())"
155154
SHLIBDIR = "-L$(shlibdir())"
156-
LIBS = is_debug() ? ("-ljulia-debug", "-ljulia-internal-debug") : ("-ljulia", "-ljulia-internal")
155+
LIBS = is_debug() ? ("-ljulia-debug", "-ljulia-internal-debug") :
156+
("-ljulia", "-ljulia-internal")
157157
@static if Sys.iswindows()
158158
LIBS = (LIBS..., "-lopenlibm", "-lssp", "-lgcc_s", "-lgcc", "-lmsvcrt")
159159
end
160160

161161
V = VERBOSE[] ? "--verbose" : ""
162-
`$(ld()) $V $SHARED -o $out $WHOLE_ARCHIVE $path $NO_WHOLE_ARCHIVE $LIBDIR $PRIVATE_LIBDIR $SHLIBDIR $LIBS`
162+
`$(ld()) $V $SHARED -o $out $WHOLE_ARCHIVE $path $NO_WHOLE_ARCHIVE $PRIVATE_LIBDIR $SHLIBDIR $LIBS`
163163
end
164164

165165
function link_image(path, out, internal_stderr::IO=stderr, internal_stdout::IO=stdout)

0 commit comments

Comments
 (0)