Skip to content

Commit 503f31c

Browse files
committed
Merge branch 'jwi-bcc64xlinker' of https://github.com/jwillemsen/MPC into jwi-bcc64xlinker
2 parents 7205f39 + 7e88f06 commit 503f31c

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

templates/bmake.mpd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COMMON_FLAGS = <%foreach(common_flags)%><%common_flag%><%endfor%>
2424
PLATFORM_LIBS_PREFIX = <%platform_libs_prefix%>
2525
OBJ_EXT = <%obj_ext%>
2626
LINKER_PATHS = <%linker_paths%>
27+
LINKER_PASSTHROUGH = <%linker_passthrough%>
2728
STARTUP_BITS = <%startup_bits%>
2829
LINK = <%link%>
2930
COMMON_LIBS = <%common_libs%>
@@ -155,10 +156,10 @@ LFLAGS = \
155156

156157
LIBFILES = \
157158
<%foreach(reverse(libs))%>
158-
<%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
159+
$(LINKER_PASSTHROUGH) <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
159160
<%endfor%>
160161
<%foreach(reverse(lit_libs))%>
161-
<%lit_lib%>$(LIB_EXT) \
162+
$(LINKER_PASSTHROUGH) <%lit_lib%>$(LIB_EXT) \
162163
<%endfor%>
163164
<%foreach(reverse(platform_libs))%>
164165
$(PLATFORM_LIBS_PREFIX)<%platform_libs%> \

templates/bmakecommon.mpt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// -*- MPC -*-
22

3-
// The *32 settings are for bcc32, *32c are for bcc32c (the clang based bcc32), and *64 are for bcc64 (also clang based)
3+
// These settings are for:
4+
// bcc32 are for bcc32, the old Embarcadero C++ compiler
5+
// bcc32c are for the clang5 based bcc32c
6+
// bcc64 are for the clang5 based bcc64
7+
// bcc64x are for the clang15 based bcc64x
48

59
conditional_include "common"
610

@@ -29,6 +33,7 @@ common_defines = WIN32 _WINDOWS
2933
common_flags = -a8
3034
obj_ext = .obj
3135
linker_paths = -L\"$(BDS)\lib\win32\release\" -L\"$(BDS)\lib\win32\debug\"
36+
linker_passthrough =
3237
startup_bits = 32
3338
link = ilink32
3439
common_libs = ws2_32$(LIB_EXT) import32$(LIB_EXT) cw32mti$(LIB_EXT) $(CG_LIB)
@@ -58,6 +63,7 @@ common_defines = WIN32 _WINDOWS
5863
common_flags = -a8
5964
obj_ext = .obj
6065
linker_paths = -L\"$(BDS)\lib\win32c\debug\" -L\"$(BDS)\lib\win32c\release\"
66+
linker_passthrough =
6167
startup_bits = 32
6268
link = ilink32
6369
common_libs = ws2_32$(LIB_EXT) import32$(LIB_EXT) cw32mti$(LIB_EXT)
@@ -86,6 +92,7 @@ common_defines = WIN32 _WINDOWS WIN64
8692
common_flags =
8793
obj_ext = .o
8894
linker_paths = -L\"$(BDS)\lib\win64\debug\" -L\"$(BDS)\lib\win64\release\" -GE:HIGHENTROPYVA=off
95+
linker_passthrough =
8996
startup_bits = 64
9097
link = ilink64
9198
common_libs = ws2_32$(LIB_EXT) import64$(LIB_EXT) cw64mti$(LIB_EXT)
@@ -103,7 +110,7 @@ bcc64x {
103110
debug_flags = -g -O0
104111
release_flags = -Wno-ignored-attributes
105112
optimize_flags = -O3
106-
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR)$(NAME).pdb
113+
pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).pdb
107114
warn_flags =
108115
stack_flag = -Xlinker --stack=
109116
cc = bcc64x
@@ -113,16 +120,17 @@ lib_ext = .lib
113120
common_defines = WIN32 _WINDOWS WIN64
114121
common_flags = -Qunused-arguments
115122
obj_ext = .o
116-
linker_paths = -L\"$(BDS)\lib\win64x\debug\" -L\"$(BDS)\lib\win64x\release\" -L\"$(BDS)\x86_64-w64-mingw32\lib\"
123+
linker_paths =
124+
linker_passthrough = -Xlinker
117125
startup_bits = 64
118126
ccflags = -q
119127
link = bcc64x
120-
common_libs = -lws2_32 -lmoldname -lucrt -lmingw32 -lmingwex -l\"c++\" -lunwind -lmingwthrd -l:import64$(LIB_EXT)
128+
common_libs = -lws2_32 -lucrt -lmingwthrd
121129
platform_libs_prefix = -l
122130
tlib = tlib64
123-
dllflags = -tD -Xlinker -m -Xlinker i386pep -Xlinker -shared -Xlinker --Bdynamic -Xlinker --enable-auto-image-base
124-
exeflags = -Xlinker -m -Xlinker i386pep -Xlinker --Bdynamic
131+
dllflags = -tD -Xlinker --Bdynamic
132+
exeflags = -Xlinker --Bdynamic
125133
object_search_path = 0
126-
linker_dll_arguments = --driver-mode=g++ $(DLLFLAGS) $(LFLAGS) $(OBJFILES) -o $(OUTPUTDIR)$(NAME)$(DLL_EXT) -Xlinker --out-implib -Xlinker $(OUTPUTDIR)$(NAME).lib $(LIBFILES) $(RESOURCE)
127-
linker_exe_arguments = --driver-mode=g++ $(EXEFLAGS) $(LFLAGS) $(OBJFILES) -o $(OUTPUTDIR)$(NAME)$(EXE_EXT) $(LIBFILES) $(RESOURCE)
134+
linker_dll_arguments = --driver-mode=g++ $(DLLFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(DLL_EXT) -Xlinker --out-implib -Xlinker $(OUTPUTDIR:\=/)$(NAME).lib $(LIBFILES:\=/) $(RESOURCE:\=/)
135+
linker_exe_arguments = --driver-mode=g++ $(EXEFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(EXE_EXT) $(LIBFILES:\=/) $(RESOURCE:\=/)
128136
}

0 commit comments

Comments
 (0)