Skip to content

Commit

Permalink
Remove nativecclibs/bytecclibs distinction
Browse files Browse the repository at this point in the history
The same libraries are used for each. Distinction kept in
Makefile.config as it's both public and could be overridden in the build
system if needed.
  • Loading branch information
dra27 committed May 24, 2023
1 parent 0c81148 commit eea40e8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ CPPFLAGS=@CPPFLAGS@
OCAMLC_CFLAGS=@ocamlc_cflags@

OCAMLC_CPPFLAGS=@ocamlc_cppflags@
BYTECCLIBS=@bytecclibs@
BYTECCLIBS=@cclibs@
EXE=@exeext@
OUTPUTEXE=@outputexe@$(EMPTY)
SUPPORTS_SHARED_LIBRARIES=@supports_shared_libraries@
Expand All @@ -187,7 +187,7 @@ MKLIB=@mklib@
# two drivers should be identical.
OCAMLOPT_CFLAGS=@ocamlc_cflags@
OCAMLOPT_CPPFLAGS=@ocamlc_cppflags@
NATIVECCLIBS=@nativecclibs@
NATIVECCLIBS=@cclibs@
SYSTHREAD_SUPPORT=@systhread_support@
PACKLD=@PACKLD@$(EMPTY)
CCOMPTYPE=@ccomptype@
Expand Down
13 changes: 4 additions & 9 deletions configure

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

12 changes: 4 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ 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([cclibs])
AC_SUBST([ocamlc_cflags])
AC_SUBST([ocamlc_cppflags])
AC_SUBST([flexdir])
Expand Down Expand Up @@ -2228,13 +2227,10 @@ cclibs="$cclibs $mathlib"

AS_CASE([$host],
[*-*-mingw32*],
[bytecclibs="-lws2_32 -lversion -l:libpthread.a -lgcc_eh"
nativecclibs="-lws2_32 -lversion -l:libpthread.a -lgcc_eh"],
[cclibs="-lws2_32 -lversion -l:libpthread.a -lgcc_eh"],
[*-pc-windows],
[bytecclibs="advapi32.lib ws2_32.lib version.lib"
nativecclibs="advapi32.lib ws2_32.lib version.lib"],
[bytecclibs="$cclibs $DLLIBS $PTHREAD_LIBS"
nativecclibs="$cclibs $DLLIBS $PTHREAD_LIBS"])
[cclibs="advapi32.lib ws2_32.lib version.lib"],
[cclibs="$cclibs $DLLIBS $PTHREAD_LIBS"])

AS_IF([test x"$libdir" = x'${exec_prefix}/lib'],
[libdir="$libdir"/ocaml])
Expand Down
4 changes: 2 additions & 2 deletions ocamltest/ocamltest_config.ml.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ let exe = {@QS@|@exeext@|@QS@}
let mkdll = {@QS@|@mkdll_exp@|@QS@}
let mkexe = {@QS@|@mkexe_exp@|@QS@}

let bytecc_libs = {@QS@|@bytecclibs@|@QS@}
let bytecc_libs = {@QS@|@cclibs@|@QS@}

let nativecc_libs = {@QS@|@nativecclibs@|@QS@}
let nativecc_libs = {@QS@|@cclibs@|@QS@}

let windows_unicode = @windows_unicode@ != 0

Expand Down
4 changes: 2 additions & 2 deletions utils/config.generated.ml.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let ocamlc_cppflags = {@QS@|@ocamlc_cppflags@|@QS@}
the two drivers should be identical. *)
let ocamlopt_cflags = {@QS@|@ocamlc_cflags@|@QS@}
let ocamlopt_cppflags = {@QS@|@ocamlc_cppflags@|@QS@}
let bytecomp_c_libraries = {@QS@|@bytecclibs@|@QS@}
let bytecomp_c_libraries = {@QS@|@cclibs@|@QS@}
(* bytecomp_c_compiler and native_c_compiler have been supported for a
long time and are retained for backwards compatibility.
For programs that don't need compatibility with older OCaml releases
Expand All @@ -44,7 +44,7 @@ let bytecomp_c_compiler =
c_compiler ^ " " ^ ocamlc_cflags ^ " " ^ ocamlc_cppflags
let native_c_compiler =
c_compiler ^ " " ^ ocamlopt_cflags ^ " " ^ ocamlopt_cppflags
let native_c_libraries = {@QS@|@nativecclibs@|@QS@}
let native_c_libraries = {@QS@|@cclibs@|@QS@}
let native_pack_linker = {@QS@|@PACKLD@|@QS@}
let default_rpath = {@QS@|@rpath@|@QS@}
let mksharedlibrpath = {@QS@|@mksharedlibrpath@|@QS@}
Expand Down

0 comments on commit eea40e8

Please sign in to comment.