Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
View | Details | Raw Unified | Return to bug 149
Collapse All | Expand All

(-)a/libphobos/libdruntime/Makefile.am (-3 / +14 lines)
Lines 27-33 IMPDIR = import Link Here
27
toolexecdir = $(phobos_toolexecdir)
27
toolexecdir = $(phobos_toolexecdir)
28
toolexeclibdir = $(phobos_toolexeclibdir)
28
toolexeclibdir = $(phobos_toolexeclibdir)
29
29
30
all-local: libgdruntime.a
30
all-local: libgdruntime.a libgdruntime.so
31
31
32
SUFFIXES = .d
32
SUFFIXES = .d
33
33
Lines 125-131 RT_POSIX_OBJS=core/sys/posix/dirent.o core/sys/posix/netdb.o \ Link Here
125
	      core/sys/posix/sys/select.o core/sys/posix/sys/socket.o \
125
	      core/sys/posix/sys/select.o core/sys/posix/sys/socket.o \
126
	      core/sys/posix/sys/stat.o core/sys/posix/sys/wait.o \
126
	      core/sys/posix/sys/stat.o core/sys/posix/sys/wait.o \
127
	      core/sys/posix/sys/un.o core/sys/posix/sys/utsname.o \
127
	      core/sys/posix/sys/un.o core/sys/posix/sys/utsname.o \
128
	      core/sys/posix/sys/utsname.o core/sys/posix/netinet/in_.o
128
	      core/sys/posix/netinet/in_.o
129
129
130
RT_WINDOWS_OBJS=core/sys/windows/dbghelp.o core/sys/windows/dll.o \
130
RT_WINDOWS_OBJS=core/sys/windows/dbghelp.o core/sys/windows/dll.o \
131
		core/sys/windows/stacktrace.o core/sys/windows/threadaux.o \
131
		core/sys/windows/stacktrace.o core/sys/windows/threadaux.o \
Lines 210-215 else Link Here
210
endif
210
endif
211
	$(RANLIB) $@
211
	$(RANLIB) $@
212
212
213
libgdruntime.so : $(ALL_DRUNTIME_OBJS) \
214
		 $(subst core/,$(IMPDIR)/core/,$(CORE_IMPORTS)) \
215
		 $(subst gcc/,$(IMPDIR)/gcc/,$(GCC_IMPORTS))
216
if BACKTRACE_SUPPORTED
217
	$(GDC) -nophoboslib -shared -o $@ $(ALL_DRUNTIME_OBJS) $(LIBBACKTRACE_LIB)
218
else
219
	$(GDC) -nophoboslib -shared -o $@ $(ALL_DRUNTIME_OBJS)
220
endif
221
213
libgdruntime_t.a : $(ALL_DRUNTIME_OBJS:.o=.t.o)
222
libgdruntime_t.a : $(ALL_DRUNTIME_OBJS:.o=.t.o)
214
if BACKTRACE_SUPPORTED
223
if BACKTRACE_SUPPORTED
215
	cp -f $(LIBBACKTRACE_LIB) $@
224
	cp -f $(LIBBACKTRACE_LIB) $@
Lines 225-234 unittest: libgdruntime.a libgdruntime_t.a unittest.o Link Here
225
#--------------------------------------#
234
#--------------------------------------#
226
# Install, doc, etc targets
235
# Install, doc, etc targets
227
236
228
install-exec-local: libgdruntime.a
237
install-exec-local: libgdruntime.a libgdruntime.so
229
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
238
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
230
	$(INSTALL) libgdruntime.a $(DESTDIR)$(toolexeclibdir)
239
	$(INSTALL) libgdruntime.a $(DESTDIR)$(toolexeclibdir)
231
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgdruntime.a
240
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgdruntime.a
241
	$(INSTALL) libgdruntime.so $(DESTDIR)$(toolexeclibdir)
232
242
233
install-data-local: libgdruntime.a
243
install-data-local: libgdruntime.a
234
	$(mkinstalldirs) $(DESTDIR)$(gdc_include_dir)
244
	$(mkinstalldirs) $(DESTDIR)$(gdc_include_dir)
Lines 270-275 clean-local: Link Here
270
	rm -f $(GCC_IMPORTS)
280
	rm -f $(GCC_IMPORTS)
271
	rm -rf $(IMPDIR)
281
	rm -rf $(IMPDIR)
272
	rm -f libgdruntime.a
282
	rm -f libgdruntime.a
283
	rm -f libgdruntime.so
273
284
274
check-local: unittest
285
check-local: unittest
275
	./unittest
286
	./unittest
(-)a/libphobos/libdruntime/Makefile.in (-3 / +10 lines)
Lines 272-278 RT_POSIX_OBJS = core/sys/posix/dirent.o core/sys/posix/netdb.o \ Link Here
272
	      core/sys/posix/sys/select.o core/sys/posix/sys/socket.o \
272
	      core/sys/posix/sys/select.o core/sys/posix/sys/socket.o \
273
	      core/sys/posix/sys/stat.o core/sys/posix/sys/wait.o \
273
	      core/sys/posix/sys/stat.o core/sys/posix/sys/wait.o \
274
	      core/sys/posix/sys/un.o core/sys/posix/sys/utsname.o \
274
	      core/sys/posix/sys/un.o core/sys/posix/sys/utsname.o \
275
	      core/sys/posix/sys/utsname.o core/sys/posix/netinet/in_.o
275
	      core/sys/posix/netinet/in_.o
276
276
277
RT_WINDOWS_OBJS = core/sys/windows/dbghelp.o core/sys/windows/dll.o \
277
RT_WINDOWS_OBJS = core/sys/windows/dbghelp.o core/sys/windows/dll.o \
278
		core/sys/windows/stacktrace.o core/sys/windows/threadaux.o \
278
		core/sys/windows/stacktrace.o core/sys/windows/threadaux.o \
Lines 578-584 uninstall-am: Link Here
578
	uninstall-am
578
	uninstall-am
579
579
580
580
581
all-local: libgdruntime.a
581
all-local: libgdruntime.a libgdruntime.so
582
582
583
%.o : %.d
583
%.o : %.d
584
	$(GDC) -o $@ $(ALL_DFLAGS) -c $<
584
	$(GDC) -o $@ $(ALL_DFLAGS) -c $<
Lines 629-634 libgdruntime.a : $(ALL_DRUNTIME_OBJS) \ Link Here
629
@BACKTRACE_SUPPORTED_FALSE@	$(AR) -r $@ $(ALL_DRUNTIME_OBJS)
629
@BACKTRACE_SUPPORTED_FALSE@	$(AR) -r $@ $(ALL_DRUNTIME_OBJS)
630
	$(RANLIB) $@
630
	$(RANLIB) $@
631
631
632
libgdruntime.so : $(ALL_DRUNTIME_OBJS) \
633
		 $(subst core/,$(IMPDIR)/core/,$(CORE_IMPORTS)) \
634
		 $(subst gcc/,$(IMPDIR)/gcc/,$(GCC_IMPORTS))
635
@BACKTRACE_SUPPORTED_TRUE@	$(GDC) -nophoboslib -shared -o $@ $(ALL_DRUNTIME_OBJS) $(LIBBACKTRACE_LIB)
636
@BACKTRACE_SUPPORTED_FALSE@	$(GDC) -nophoboslib -shared -o $@ $(ALL_DRUNTIME_OBJS)
637
632
libgdruntime_t.a : $(ALL_DRUNTIME_OBJS:.o=.t.o)
638
libgdruntime_t.a : $(ALL_DRUNTIME_OBJS:.o=.t.o)
633
@BACKTRACE_SUPPORTED_TRUE@	cp -f $(LIBBACKTRACE_LIB) $@
639
@BACKTRACE_SUPPORTED_TRUE@	cp -f $(LIBBACKTRACE_LIB) $@
634
@BACKTRACE_SUPPORTED_TRUE@	$(AR) -q $@ $(ALL_DRUNTIME_OBJS:.o=.t.o)
640
@BACKTRACE_SUPPORTED_TRUE@	$(AR) -q $@ $(ALL_DRUNTIME_OBJS:.o=.t.o)
Lines 641-650 unittest: libgdruntime.a libgdruntime_t.a unittest.o Link Here
641
#--------------------------------------#
647
#--------------------------------------#
642
# Install, doc, etc targets
648
# Install, doc, etc targets
643
649
644
install-exec-local: libgdruntime.a
650
install-exec-local: libgdruntime.a libgdruntime.so
645
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
651
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
646
	$(INSTALL) libgdruntime.a $(DESTDIR)$(toolexeclibdir)
652
	$(INSTALL) libgdruntime.a $(DESTDIR)$(toolexeclibdir)
647
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgdruntime.a
653
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgdruntime.a
654
	$(INSTALL) libgdruntime.so $(DESTDIR)$(toolexeclibdir)
648
655
649
install-data-local: libgdruntime.a
656
install-data-local: libgdruntime.a
650
	$(mkinstalldirs) $(DESTDIR)$(gdc_include_dir)
657
	$(mkinstalldirs) $(DESTDIR)$(gdc_include_dir)
(-)a/libphobos/src/Makefile.am (-3 / +10 lines)
Lines 26-32 ALL_DFLAGS=$(DFLAGS) $(D_EXTRA_DFLAGS) $(MULTIFLAGS) Link Here
26
toolexecdir = $(phobos_toolexecdir)
26
toolexecdir = $(phobos_toolexecdir)
27
toolexeclibdir = $(phobos_toolexeclibdir)
27
toolexeclibdir = $(phobos_toolexeclibdir)
28
28
29
all-local: libgphobos2.a
29
all-local: libgphobos2.a libgphobos2.so
30
30
31
SUFFIXES = .d
31
SUFFIXES = .d
32
32
Lines 98-104 ZLIB_OBJS=@ZLIB_OBJS@ Link Here
98
OS_OBJS=std/file.o std/mmfile.o std/path.o std/process.o \
98
OS_OBJS=std/file.o std/mmfile.o std/path.o std/process.o \
99
	std/socket.o std/socketstream.o
99
	std/socket.o std/socketstream.o
100
100
101
LINUX_OBJS=std/c/linux/linux.o std/c/linux/socket.o
101
#LINUX_OBJS=std/c/linux/linux.o std/c/linux/socket.o
102
# std/c/linux/linux.o is in D_EXTRA_OBJS
103
LINUX_OBJS=std/c/linux/socket.o
102
104
103
OSX_OBJS=std/c/osx/socket.o
105
OSX_OBJS=std/c/osx/socket.o
104
106
Lines 120-125 libgphobos2.a : $(ALL_PHOBOS_OBJS) ../libdruntime/libgdruntime.a Link Here
120
	$(AR) -q $@ $(ALL_PHOBOS_OBJS)
122
	$(AR) -q $@ $(ALL_PHOBOS_OBJS)
121
	$(RANLIB) $@
123
	$(RANLIB) $@
122
124
125
libgphobos2.so : $(ALL_PHOBOS_OBJS) ../libdruntime/libgdruntime.so
126
	$(GDC) -nophoboslib -shared -o $@ $(ALL_PHOBOS_OBJS)
127
123
libgphobos2_t.a : $(ALL_PHOBOS_OBJS:.o=.t.o)
128
libgphobos2_t.a : $(ALL_PHOBOS_OBJS:.o=.t.o)
124
	$(AR) -r $@ $(ALL_PHOBOS_OBJS:.o=.t.o)
129
	$(AR) -r $@ $(ALL_PHOBOS_OBJS:.o=.t.o)
125
	$(RANLIB) $@
130
	$(RANLIB) $@
Lines 130-139 unittest: libgphobos2.a libgphobos2_t.a unittest.o Link Here
130
#--------------------------------------#
135
#--------------------------------------#
131
# Install, doc, etc targets
136
# Install, doc, etc targets
132
137
133
install-exec-local: libgphobos2.a
138
install-exec-local: libgphobos2.a libgphobos2.so
134
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
139
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
135
	$(INSTALL) libgphobos2.a $(DESTDIR)$(toolexeclibdir)
140
	$(INSTALL) libgphobos2.a $(DESTDIR)$(toolexeclibdir)
136
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgphobos2.a
141
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgphobos2.a
142
	$(INSTALL) libgphobos2.so $(DESTDIR)$(toolexeclibdir)
137
143
138
install-data-local: libgphobos2.a
144
install-data-local: libgphobos2.a
139
	for i in etc/c \
145
	for i in etc/c \
Lines 155-160 clean-local: Link Here
155
	rm -f unittest$(EXEEXT)
161
	rm -f unittest$(EXEEXT)
156
	rm -f libgphobos2.a
162
	rm -f libgphobos2.a
157
	rm -f libgphobos2_t.a
163
	rm -f libgphobos2_t.a
164
	rm -f libgphobos2.so
158
165
159
check-local: unittest
166
check-local: unittest
160
	./unittest
167
	./unittest
(-)a/libphobos/src/Makefile.in (-3 / +9 lines)
Lines 268-274 Z_OBJS = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o \ Link Here
268
OS_OBJS = std/file.o std/mmfile.o std/path.o std/process.o \
268
OS_OBJS = std/file.o std/mmfile.o std/path.o std/process.o \
269
	std/socket.o std/socketstream.o
269
	std/socket.o std/socketstream.o
270
270
271
LINUX_OBJS = std/c/linux/linux.o std/c/linux/socket.o
271
#LINUX_OBJS=std/c/linux/linux.o std/c/linux/socket.o
272
# std/c/linux/linux.o is in D_EXTRA_OBJS
273
LINUX_OBJS = std/c/linux/socket.o
272
OSX_OBJS = std/c/osx/socket.o
274
OSX_OBJS = std/c/osx/socket.o
273
FREEBSD_OBJS = std/c/freebsd/socket.o
275
FREEBSD_OBJS = std/c/freebsd/socket.o
274
276
Lines 513-519 uninstall-am: Link Here
513
	uninstall-am
515
	uninstall-am
514
516
515
517
516
all-local: libgphobos2.a
518
all-local: libgphobos2.a libgphobos2.so
517
519
518
%.o : %.d
520
%.o : %.d
519
	$(GDC) -o $@ $(ALL_DFLAGS) -c $<
521
	$(GDC) -o $@ $(ALL_DFLAGS) -c $<
Lines 541-546 libgphobos2.a : $(ALL_PHOBOS_OBJS) ../libdruntime/libgdruntime.a Link Here
541
	$(AR) -q $@ $(ALL_PHOBOS_OBJS)
543
	$(AR) -q $@ $(ALL_PHOBOS_OBJS)
542
	$(RANLIB) $@
544
	$(RANLIB) $@
543
545
546
libgphobos2.so : $(ALL_PHOBOS_OBJS) ../libdruntime/libgdruntime.so
547
	$(GDC) -nophoboslib -shared -o $@ $(ALL_PHOBOS_OBJS)
548
544
libgphobos2_t.a : $(ALL_PHOBOS_OBJS:.o=.t.o)
549
libgphobos2_t.a : $(ALL_PHOBOS_OBJS:.o=.t.o)
545
	$(AR) -r $@ $(ALL_PHOBOS_OBJS:.o=.t.o)
550
	$(AR) -r $@ $(ALL_PHOBOS_OBJS:.o=.t.o)
546
	$(RANLIB) $@
551
	$(RANLIB) $@
Lines 551-560 unittest: libgphobos2.a libgphobos2_t.a unittest.o Link Here
551
#--------------------------------------#
556
#--------------------------------------#
552
# Install, doc, etc targets
557
# Install, doc, etc targets
553
558
554
install-exec-local: libgphobos2.a
559
install-exec-local: libgphobos2.a libgphobos2.so
555
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
560
	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
556
	$(INSTALL) libgphobos2.a $(DESTDIR)$(toolexeclibdir)
561
	$(INSTALL) libgphobos2.a $(DESTDIR)$(toolexeclibdir)
557
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgphobos2.a
562
	$(RANLIB) $(DESTDIR)$(toolexeclibdir)/libgphobos2.a
563
	$(INSTALL) libgphobos2.so $(DESTDIR)$(toolexeclibdir)
558
564
559
install-data-local: libgphobos2.a
565
install-data-local: libgphobos2.a
560
	for i in etc/c \
566
	for i in etc/c \
(-)a/gcc/d/d-spec.cc (-1 / +23 lines)
Lines 140-145 lang_specific_driver (cl_decoded_option **in_decoded_options, Link Here
140
  /* True if we should add -shared-libgcc to the command-line.  */
140
  /* True if we should add -shared-libgcc to the command-line.  */
141
  int shared_libgcc = 1;
141
  int shared_libgcc = 1;
142
142
143
  /* False if we found -static-libphobos in the original command-line.  */
144
  int use_shared_libphobos = 1;
145
143
  /* The total number of arguments with the new stuff.  */
146
  /* The total number of arguments with the new stuff.  */
144
  int argc;
147
  int argc;
145
148
Lines 297-302 lang_specific_driver (cl_decoded_option **in_decoded_options, Link Here
297
300
298
	case OPT_static_libphobos:
301
	case OPT_static_libphobos:
299
	  library = library >= 0 ? 2 : library;
302
	  library = library >= 0 ? 2 : library;
303
	  if (use_shared_libphobos) {
304
	    added = 1; // force argument rebuild
305
	    use_shared_libphobos = 0; /*k8*/
306
	  }
300
	  args[i] |= SKIPOPT;
307
	  args[i] |= SKIPOPT;
301
	  break;
308
	  break;
302
309
Lines 367-373 lang_specific_driver (cl_decoded_option **in_decoded_options, Link Here
367
  /* There is one extra argument added here for the runtime
374
  /* There is one extra argument added here for the runtime
368
     library: -lgphobos.  The -pthread argument is added by
375
     library: -lgphobos.  The -pthread argument is added by
369
     setting need_thread. */
376
     setting need_thread. */
370
  num_args = argc + added + need_math + shared_libgcc + (library > 0) * 4 + 2;
377
   /*k8: use_shared_libphobos*2 due to -lcurl and -lgdruntime*/
378
  num_args = argc + added + need_math + shared_libgcc + (library > 0) * 4 + 2 + use_shared_libphobos * 2;
371
  new_decoded_options = XNEWVEC (cl_decoded_option, num_args);
379
  new_decoded_options = XNEWVEC (cl_decoded_option, num_args);
372
380
373
  i = 0;
381
  i = 0;
Lines 476-486 lang_specific_driver (cl_decoded_option **in_decoded_options, Link Here
476
	}
484
	}
477
#endif
485
#endif
478
486
487
      if (use_shared_libphobos) {
488
        /*k8: add '-lgdruntime', cause libgphobos2.so needs it*/
489
        generate_option (OPT_l, "gdruntime", 1, CL_DRIVER, &new_decoded_options[j]);
490
        added_libraries++;
491
        j++;
492
      }
493
479
      generate_option (OPT_l, saw_profile_flag ? LIBPHOBOS_PROFILE : LIBPHOBOS, 1,
494
      generate_option (OPT_l, saw_profile_flag ? LIBPHOBOS_PROFILE : LIBPHOBOS, 1,
480
		       CL_DRIVER, &new_decoded_options[j]);
495
		       CL_DRIVER, &new_decoded_options[j]);
481
      added_libraries++;
496
      added_libraries++;
482
      j++;
497
      j++;
483
498
499
      if (use_shared_libphobos) {
500
        /*k8: add '-lcurl', cause libgphobos2.so needs it*/
501
        generate_option (OPT_l, "curl", 1, CL_DRIVER, &new_decoded_options[j]);
502
        added_libraries++;
503
        j++;
504
      }
505
484
#ifdef HAVE_LD_STATIC_DYNAMIC
506
#ifdef HAVE_LD_STATIC_DYNAMIC
485
      if (library > 1 && !static_link)
507
      if (library > 1 && !static_link)
486
	{
508
	{

Return to bug 149