[m-rev.] -install_name option

Julien Fischer jfischer at opturion.com
Wed Sep 28 16:00:56 AEST 2016


Hi Peter,

On Wed, 28 Sep 2016, Peter Wang wrote:

> What's the cleanest way to make this change for non-Mac users?

For now, just check whether $FULLARCH contains "apple-darwin" and only
enable the -install_name option if it does.   That should handle all of
the system we care about.

Longer term, it might better if the Mercury compiler itself had a
version of the -install_name option (e.g. so on non-Mac systems it
would do nothing).

Julien.

> diff --git a/browser/Mmakefile b/browser/Mmakefile
> index ff8d063..128c05f 100644
> --- a/browser/Mmakefile
> +++ b/browser/Mmakefile
> @@ -89,8 +89,8 @@ MCFLAGS      += --flags MDB_FLAGS $(CONFIG_OVERRIDE)
> # to be passed in the .dep files.
> 
> ifeq ($(MMAKE_USE_MMC_MAKE),yes)
> -MCFLAGS += --ld-libflags \
> -	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(BROWSER_LIB_NAME).dylib"
> +# MCFLAGS += --ld-libflags \
> +# 	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(BROWSER_LIB_NAME).dylib"
> else
> LD_LIBFLAGS-libmer_browser.dylib = -install_name \
> 	$(FINAL_INSTALL_MERC_LIB_DIR)/lib$(BROWSER_LIB_NAME).dylib
> diff --git a/library/Mmakefile b/library/Mmakefile
> index 2c51d95..68270ee 100644
> --- a/library/Mmakefile
> +++ b/library/Mmakefile
> @@ -148,8 +148,8 @@ LN	= ln
> # to be passed in the .dep files.
> 
> ifeq ($(MMAKE_USE_MMC_MAKE),yes)
> -MCFLAGS += --ld-libflags \
> -	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).dylib"
> +# MCFLAGS += --ld-libflags \
> +# 	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).dylib"
> else
> LD_LIBFLAGS-libmer_std.dylib = -install_name \
> 	$(FINAL_INSTALL_MERC_LIB_DIR)/lib$(STD_LIB_NAME).dylib
> diff --git a/mdbcomp/Mmakefile b/mdbcomp/Mmakefile
> index d272f5e..5b9d700 100644
> --- a/mdbcomp/Mmakefile
> +++ b/mdbcomp/Mmakefile
> @@ -78,8 +78,8 @@ endif
> # to be passed in the .dep files.
> 
> ifeq ($(MMAKE_USE_MMC_MAKE),yes)
> -MCFLAGS += --ld-libflags \
> -	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(MDBCOMP_LIB_NAME).dylib"
> +# MCFLAGS += --ld-libflags \
> +# 	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(MDBCOMP_LIB_NAME).dylib"
> else
> LD_LIBFLAGS-libmer_mdbcomp.dylib = -install_name \
> 	$(FINAL_INSTALL_MERC_LIB_DIR)/lib$(MDBCOMP_LIB_NAME).dylib
> diff --git a/ssdb/Mmakefile b/ssdb/Mmakefile
> index ea51cbc..998fbc4 100644
> --- a/ssdb/Mmakefile
> +++ b/ssdb/Mmakefile
> @@ -89,8 +89,8 @@ MCFLAGS      += --flags SSDB_FLAGS $(CONFIG_OVERRIDE)
> # to be passed in the .dep files.
> 
> ifeq ($(MMAKE_USE_MMC_MAKE),yes)
> -MCFLAGS += --ld-libflags \
> -	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(SSDB_LIB_NAME).dylib"
> +# MCFLAGS += --ld-libflags \
> +# 	"-install_name $(FINAL_INSTALL_MERC_LIB_DIR)/lib$(SSDB_LIB_NAME).dylib"
> else
> LD_LIBFLAGS-libmer_ssdb.dylib = -install_name \
> 	$(FINAL_INSTALL_MERC_LIB_DIR)/lib$(SSDB_LIB_NAME).dylib
>
> _______________________________________________
> reviews mailing list
> reviews at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/reviews


More information about the reviews mailing list