Skip to content

Commit

Permalink
Fix MKEXE_VIA_CC
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Sep 9, 2022
1 parent 4fa9b8d commit 3f6c379
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ AS_HAS_DEBUG_PREFIX_MAP=@as_has_debug_prefix_map@
# our own symbols):
OC_LDFLAGS=@oc_ldflags@
OC_DLL_LDFLAGS=@oc_dll_ldflags@
OC_EXE_LDFLAGS=@oc_exe_ldflags@

LDFLAGS?=@LDFLAGS@

Expand Down Expand Up @@ -219,7 +220,8 @@ MKEXE=@mkexe@
MKDLL=@mkdll@
MKMAINDLL=@mkmaindll@
MKEXEDEBUGFLAG=@mkexedebugflag@
MKEXE_VIA_CC=$(CC) $(OC_CFLAGS) $(CFLAGS) @mkexe_via_cc_ldflags@
MKEXE_VIA_CC=\
$(CC) $(OC_EXE_LDFLAGS) $(OC_CFLAGS) $(CFLAGS) @mkexe_via_cc_ldflags@

RUNTIMED=@debug_runtime@
INSTRUMENTED_RUNTIME=@instrumented_runtime@
Expand Down
11 changes: 8 additions & 3 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ocamlc_cflags=""
ocamlc_cppflags=""
oc_ldflags=""
oc_dll_ldflags=""
oc_exe_ldflags=""

# The C# compiler and its flags
CSC=""
Expand Down Expand Up @@ -135,6 +136,7 @@ AC_SUBST([oc_cflags])
AC_SUBST([oc_cppflags])
AC_SUBST([oc_ldflags])
AC_SUBST([oc_dll_ldflags])
AC_SUBST([oc_exe_ldflags])
AC_SUBST([bytecclibs])
AC_SUBST([nativecclibs])
AC_SUBST([ocamlc_cflags])
Expand Down Expand Up @@ -918,7 +920,8 @@ AS_CASE([$cc_basename,$host],
[mkexe_cmd="$mkexe_cmd_exp"])
mkexe_cflags=''
mkexe_ldflags_prefix='-link '
mkexe_extra_flags='-link -municode'
oc_exe_ldflags='-municode'
mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags"
SO="dll"],
[*,*-pc-windows],
[toolchain=msvc
Expand All @@ -931,7 +934,8 @@ AS_CASE([$cc_basename,$host],
mkexe_cflags=''
mkexe_ldflags_prefix='-link '
mkexe_via_cc_ldflags_prefix='/link '
mkexe_extra_flags='-link /ENTRY:wmainCRTStartup'
oc_exe_ldflags='/ENTRY:wmainCRTStartup'
mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags"
mkexedebugflag=''],
[*,x86_64-*-linux*],
AC_DEFINE([HAS_ARCH_CODE32], [1]),
Expand Down Expand Up @@ -2247,7 +2251,7 @@ AC_CONFIG_COMMANDS_PRE([
# $mkdll - the full linking command for DLLs
# $mkdll_exp: same as above but expanded
# $mkmaindll - the full linking command for main program in DLL
# $oc_ldflags and $oc_dll_ldflags are handled as $(OC_LDFLAGS) and
# $oc_ldflags $oc_dll_ldflags are handled as $(OC_LDFLAGS) and
# $(OC_DLL_LDFLAGS) and can be overidden in the build.
AC_CONFIG_COMMANDS_PRE([
# Construct $mkexe
Expand Down

0 comments on commit 3f6c379

Please sign in to comment.