Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Shared builds for FreeBSD and mv sections_linux to sections_elf_shared
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Dec 27, 2014
1 parent f3c7922 commit bda15e6
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 168 deletions.
3 changes: 1 addition & 2 deletions mak/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ MANIFEST=\
src\rt\qsort.d \
src\rt\sections.d \
src\rt\sections_android.d \
src\rt\sections_freebsd.d \
src\rt\sections_linux.d \
src\rt\sections_elf_shared.d \
src\rt\sections_osx.d \
src\rt\sections_solaris.d \
src\rt\sections_win32.d \
Expand Down
3 changes: 1 addition & 2 deletions mak/SRCS
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ SRCS=\
src\rt\qsort.d \
src\rt\sections.d \
src\rt\sections_android.d \
src\rt\sections_freebsd.d \
src\rt\sections_linux.d \
src\rt\sections_elf_shared.d \
src\rt\sections_osx.d \
src\rt\sections_solaris.d \
src\rt\sections_win32.d \
Expand Down
9 changes: 6 additions & 3 deletions posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ SRCS:=$(subst \,/,$(SRCS))

OBJS= $(OBJDIR)/errno_c.o $(OBJDIR)/bss_section.o $(OBJDIR)/threadasm.o

# build with shared library support
SHARED=$(if $(findstring $(OS),linux freebsd),1,)

######################## All of'em ##############################

ifeq (linux,$(OS))
ifneq (,$(SHARED))
target : import copy dll $(DRUNTIME)
else
target : import copy $(DRUNTIME)
Expand Down Expand Up @@ -181,7 +184,7 @@ UT_MODULES:=$(patsubst src/%.d,$(OBJDIR)/%,$(SRCS))
HAS_ADDITIONAL_TESTS:=$(shell test -d test && echo 1)
ifeq ($(HAS_ADDITIONAL_TESTS),1)
ADDITIONAL_TESTS:=test/init_fini test/exceptions
ADDITIONAL_TESTS+=$(if $(findstring $(OS),linux),test/shared,)
ADDITIONAL_TESTS+=$(if $(SHARED),test/shared,)
endif

unittest : $(UT_MODULES) $(addsuffix /.run,$(ADDITIONAL_TESTS))
Expand All @@ -196,7 +199,7 @@ endif
$(addprefix $(OBJDIR)/,$(DISABLED_TESTS)) :
@echo $@ - disabled

ifneq (linux,$(OS))
ifeq (,$(SHARED))

$(OBJDIR)/test_runner: $(OBJS) $(SRCS) src/test_runner.d
$(DMD) $(UDFLAGS) -unittest -of$@ src/test_runner.d $(SRCS) $(OBJS) -debuglib= -defaultlib=
Expand Down
4 changes: 2 additions & 2 deletions src/rt/sections.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
module rt.sections;

version (linux)
public import rt.sections_linux;
public import rt.sections_elf_shared;
else version (FreeBSD)
public import rt.sections_freebsd;
public import rt.sections_elf_shared;
else version (Solaris)
public import rt.sections_solaris;
else version (OSX)
Expand Down
File renamed without changes.
159 changes: 0 additions & 159 deletions src/rt/sections_freebsd.d

This file was deleted.

0 comments on commit bda15e6

Please sign in to comment.