From 3c5443e1fb51b5b0f391429ca1d79f1057b5a693 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sun, 28 Jul 2024 14:30:35 +0200 Subject: [PATCH 1/3] Add unicode linker flags * templates/bmake.mpd: * templates/bmakecommon.mpt: --- templates/bmake.mpd | 2 ++ templates/bmakecommon.mpt | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/bmake.mpd b/templates/bmake.mpd index 91fd9c93..a4eb2806 100644 --- a/templates/bmake.mpd +++ b/templates/bmake.mpd @@ -11,6 +11,7 @@ CC = <%cc%> OPTIMIZE_CFLAGS = <%optimize_flags%> UNICODE_CFLAGS = <%unicode_flags%> +UNICODE_LFLAGS = <%unicode_linker_flags%> PDB_FLAGS = <%pdb_flags%> DEBUG_CFLAGS = <%debug_flags%> RELEASE_CFLAGS = <%release_flags%> @@ -80,6 +81,7 @@ EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug !ifdef UNICODE UC_CFLAGS = $(UNICODE_CFLAGS) +UC_LFLAGS = $(UNICODE_LFLAGS) UNICODE_DIR = Unicode\\ UC_MAIN = w ULIBMODIFIER = <%unicode_lib_modifier%> diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt index 78a84b10..6da6809c 100644 --- a/templates/bmakecommon.mpt +++ b/templates/bmakecommon.mpt @@ -116,6 +116,7 @@ debug_flags = -g -O0 release_flags = -Wno-ignored-attributes optimize_flags = -O3 unicode_flags = -tU +unicode_linker_flags = -tU debug_ext = .pdb pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).$(DEBUG_EXT) warn_flags = @@ -138,6 +139,6 @@ tlib = tlib64 dllflags = -tD -tR exeflags = -tR object_search_path = 0 -linker_dll_arguments = --driver-mode=g++ $(DLLFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(DLL_EXT) -Xlinker --out-implib -Xlinker $(OUTPUTDIR:\=/)$(NAME).lib $(LIBFILES:\=/) $(RESOURCE:\=/) -linker_exe_arguments = --driver-mode=g++ $(EXEFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(EXE_EXT) $(LIBFILES:\=/) $(RESOURCE:\=/) +linker_dll_arguments = --driver-mode=g++ $(DLLFLAGS) $(UC_LFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(DLL_EXT) -Xlinker --out-implib -Xlinker $(OUTPUTDIR:\=/)$(NAME).lib $(LIBFILES:\=/) $(RESOURCE:\=/) +linker_exe_arguments = --driver-mode=g++ $(EXEFLAGS) $(UC_LFLAGS) $(LFLAGS:\=/) $(OBJFILES:\=/) -o $(OUTPUTDIR:\=/)$(NAME)$(EXE_EXT) $(LIBFILES:\=/) $(RESOURCE:\=/) } From f5c93bdad3a46cc08e69a315c9b809b9f972cf89 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Sun, 28 Jul 2024 14:30:59 +0200 Subject: [PATCH 2/3] Add flags * templates/bmakecommon.mpt: --- templates/bmakecommon.mpt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt index 6da6809c..35b08e68 100644 --- a/templates/bmakecommon.mpt +++ b/templates/bmakecommon.mpt @@ -22,6 +22,7 @@ debug_flags = -v -y -Od -vi- -k release_flags = optimize_flags = -O1 unicode_flags = -WU +unicode_linker_flags = pdb_flags = warn_flags = -w-rvl -w-rch -w-ccc -w-obs -w-aus -w-pia -w-inl -w-mls stack_flag = /S: @@ -54,6 +55,7 @@ debug_flags = -Od -vi- release_flags = optimize_flags = -O3 unicode_flags = -WU +unicode_linker_flags = pdb_flags = warn_flags = stack_flag = /S: @@ -85,6 +87,7 @@ debug_flags = -g -O0 release_flags = optimize_flags = -O3 unicode_flags = -WU +unicode_linker_flags = pdb_flags = warn_flags = stack_flag = /S: From 6fc43da85a01bfdb5a9e5a0404b241a499f8c661 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 29 Jul 2024 09:20:10 +0200 Subject: [PATCH 3/3] Remove double dot in filename * templates/bmakecommon.mpt: --- templates/bmakecommon.mpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/bmakecommon.mpt b/templates/bmakecommon.mpt index 35b08e68..2d2286b6 100644 --- a/templates/bmakecommon.mpt +++ b/templates/bmakecommon.mpt @@ -121,7 +121,7 @@ optimize_flags = -O3 unicode_flags = -tU unicode_linker_flags = -tU debug_ext = .pdb -pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME).$(DEBUG_EXT) +pdb_flags = -Xlinker -pdb -Xlinker $(OUTPUTDIR:\=/)$(NAME)$(DEBUG_EXT) warn_flags = stack_flag = -Xlinker --stack= cc = bcc64x