PKGBUILDs/community/gdc/system_zlib.diff
2016-05-10 00:08:49 +00:00

49 lines
1.7 KiB
Diff

diff --git a/gcc/d/d-spec.c b/gcc/d/d-spec.c
index d45c648..9010edb 100644
--- a/gcc/d/d-spec.c
+++ b/gcc/d/d-spec.c
@@ -96,7 +96,7 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
/* The number of arguments being added to what's in argv, other than
libraries. We use this to track the number of times we've inserted
-xd/-xnone. */
- int added = 0;
+ int added = 1; /* -lz */
/* The new argument list will be contained in this. */
cl_decoded_option *new_decoded_options;
@@ -468,6 +468,14 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
j++;
}
+ /* Use the up-to-date system zlib with libphobos */
+ {
+ generate_option (OPT_l, "z", 1, CL_DRIVER,
+ &new_decoded_options[j]);
+ added_libraries++;
+ j++;
+ }
+
/* Add `-lgphobos' if we haven't already done so. */
if (library > 0 && phobos)
{
diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in
index 6597116..f0f42e3 100644
--- a/libphobos/src/Makefile.in
+++ b/libphobos/src/Makefile.in
@@ -151,7 +151,6 @@ SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
WERROR = @WERROR@
-ZLIB_OBJS = @ZLIB_OBJS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -283,7 +282,7 @@ WINDOWS_OBJS = std/c/windows/com.o std/c/windows/stat.o std/c/wcharh.o \
std/windows/charset.o std/windows/iunknown.o std/windows/registry.o \
std/windows/syserror.o std/internal/windows/advapi32.o
-ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS) $(ZLIB_OBJS)
+ALL_PHOBOS_OBJS = $(D_EXTRA_OBJS) $(MAIN_OBJS)
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and