summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-01-14 18:40:59 -0600
committerSamuel Holland <samuel@sholland.org>2018-01-14 18:57:52 -0600
commitdfafb0735f09d65a392d03a2d1ad3d0b934981da (patch)
treef5a1c49f22df2e72494cd114785763b111d6924a /Makefile
parentd40369b0e09e4e2228ebff305067ec2d99220848 (diff)
downloadgcompat-dfafb0735f09d65a392d03a2d1ad3d0b934981da.tar.gz
gcompat-dfafb0735f09d65a392d03a2d1ad3d0b934981da.tar.bz2
gcompat-dfafb0735f09d65a392d03a2d1ad3d0b934981da.tar.xz
gcompat-dfafb0735f09d65a392d03a2d1ad3d0b934981da.zip
libgcompat: Add and use a macro for defining symbol aliases
* Prefer providing the underscore-prefixed symbol as the strong definition. * Do not use a weak alias if the alias is also underscore-prefixed. * Make libgcompat objects depend on the new header. [NOTE: I originally took the weak_alias macro from musl's libc.h, but it's trivial and the same pattern already in use. If desired, I can add the musl copyright notice.] Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 6c532fd..b941dcf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+LIBGCOMPAT_INCLUDE = \
+ libgcompat/alias.h
LIBGCOMPAT_SRC = \
libgcompat/backtrace.c \
libgcompat/dlmopen.c \
@@ -33,6 +35,8 @@ ${LIBGCOMPAT_NAME}: ${LIBGCOMPAT_OBJ}
$(CC) -o ${LIBGCOMPAT_NAME} -Wl,-soname,${LIBGCOMPAT_NAME} \
-shared ${LIBGCOMPAT_OBJ}
+${LIBGCOMPAT_OBJ}: ${LIBGCOMPAT_INCLUDE}
+
${LOADER_NAME}: ${LOADER_OBJ}
$(CC) -o ${LOADER_NAME} -fPIE -static ${LOADER_OBJ}