void-packages/srcpkgs/pcc/patches/void.patch

41 lines
1.5 KiB
Diff

--- a/pcc/os/linux/ccconfig.h 2019-04-21 12:16:53.029059057 +0200
+++ b/pcc/os/linux/ccconfig.h 2019-04-21 12:18:19.757287684 +0200
@@ -39,26 +39,31 @@
#if defined(mach_i386)
#define CPPMDADD { "-D__i386__", NULL, }
-#define DYNLINKER { "-dynamic-linker", "/lib/ld-linux.so.2", NULL }
+#define DYNLINKER { "-dynamic-linker", "/usr/lib/ld-linux.so.2", NULL }
#elif defined(mach_powerpc)
#define CPPMDADD { "-D__ppc__", NULL, }
-#define DYNLINKER { "-dynamic-linker", "/lib/ld-linux.so.2", NULL }
+#define DYNLINKER { "-dynamic-linker", "/usr/lib/ld-linux.so.2", NULL }
#elif defined(mach_amd64)
#define CPPMDADD { "-D__x86_64__", "-D__x86_64", "-D__amd64__", \
"-D__amd64", "-D__LP64__", "-D_LP64", NULL, }
-#define DYNLINKER { "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", NULL }
+#define DYNLINKER { "-dynamic-linker", "/usr/lib/ld-linux-x86-64.so.2", NULL }
#ifndef MULTIARCH_PATH
-#define DEFLIBDIRS { "/usr/lib64/", 0 }
+#define DEFLIBDIRS { "/usr/lib/", 0 }
#else
-#define DEFLIBDIRS { "/usr/lib64/", "/usr/lib/" MULTIARCH_PATH "/", 0 }
+#define DEFLIBDIRS { "/usr/lib/", "/usr/lib32/" MULTIARCH_PATH "/", 0 }
#endif
#elif defined(mach_mips)
#define CPPMDADD { "-D__mips__", NULL, }
-#define DYNLINKER { "-dynamic-linker", "/lib/ld.so.1", NULL }
+#define DYNLINKER { "-dynamic-linker", "/usr/lib/ld.so.1", NULL }
#else
#error defines for arch missing
#endif
+/* musl */
+#ifndef __GLIBC__
+#define DYNLINKER { "-dynamic-linker", "/usr/lib/libc.so", NULL }
+#endif
+
/* fixup small m options */
#if defined(mach_amd64)
#define PCC_EARLY_ARG_CHECK { \