diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2022-12-17 14:48:03 +0000 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2022-12-31 16:16:30 +0000 |
commit | 2d8c2fdc299034c85a0abfd7da31168d02a41d32 (patch) | |
tree | 2044edcc4744af3966ce5125fd17169b1e24677a /libgm2/libm2iso | |
parent | ebc41f9a817dbae01c7450cd33c1968318ce8df0 (diff) | |
download | gcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.zip gcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.tar.gz gcc-2d8c2fdc299034c85a0abfd7da31168d02a41d32.tar.bz2 |
modula-2,libgm2: Add undefined, dynamic_lookup to m2 libs links.
The libm2 libraries are cross-linked, which means that we need to allow
symbols to be undefined at link time and then to be found at runtime.
This is implemented on Darwin by adding -undefined, dynamic_lookup to
the link command.
NOTE: It would probably be a better solution to rework the libraries
either to combine those that have inter-dependencies, or to reorder
the layering so the there is a fixed dependency tree.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
libgm2/ChangeLog:
* configure: Regenerate.
* configure.ac: Make a conditional for configurations targeting
Darwin.
* libm2cor/Makefile.am: Use -undefined,dynamic_lookup on Darwin.
* libm2iso/Makefile.am: Likewise.
* libm2log/Makefile.am: Likewise.
* libm2pim/Makefile.am: Likewise
* libm2min/Makefile.am: Likewise
* libm2cor/Makefile.in: Regenerate.
* libm2iso/Makefile.in: Regenerate.
* libm2log/Makefile.in: Regenerate.
* libm2min/Makefile.in: Regenerate.
* libm2pim/Makefile.in: Regenerate.
Diffstat (limited to 'libgm2/libm2iso')
-rw-r--r-- | libgm2/libm2iso/Makefile.am | 7 | ||||
-rw-r--r-- | libgm2/libm2iso/Makefile.in | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am index dc54720..fc0e4f5 100644 --- a/libgm2/libm2iso/Makefile.am +++ b/libgm2/libm2iso/Makefile.am @@ -187,7 +187,12 @@ libm2isodir = libm2iso libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES))) libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) +if TARGET_DARWIN +libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup +else +libm2iso_la_link_flags = +endif +libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags) CLEANFILES = SYSTEM.def BUILT_SOURCES = SYSTEM.def diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in index 04aba0f..e628dd3 100644 --- a/libgm2/libm2iso/Makefile.in +++ b/libgm2/libm2iso/Makefile.in @@ -563,7 +563,9 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_ISOLIB_TRUE@libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_SOURCES))) @BUILD_ISOLIB_TRUE@libm2iso_la_CFLAGS = $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include @BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs -fiso -fextended-opaque -fm2-g -g -@BUILD_ISOLIB_TRUE@libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) +@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = +@BUILD_ISOLIB_TRUE@@TARGET_DARWIN_TRUE@libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup +@BUILD_ISOLIB_TRUE@libm2iso_la_LINK = $(LINK) -version-info $(libtool_VERSION) $(libm2iso_la_link_flags) @BUILD_ISOLIB_TRUE@CLEANFILES = SYSTEM.def @BUILD_ISOLIB_TRUE@BUILT_SOURCES = SYSTEM.def @BUILD_ISOLIB_TRUE@M2LIBDIR = /m2/m2iso/ |