void-packages/srcpkgs/pcc/patches/void.patch
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

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 { \