summaryrefslogtreecommitdiff
path: root/dev-python/leechcorepyc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-26 03:55:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-26 03:55:42 +0000
commit61044571b76d87a2eec42d36c9b7addf3e66e000 (patch)
tree5ac1c90c51a6331aabe26008ffb1150a72d7d2d0 /dev-python/leechcorepyc/files
parentef596bcaa32d9c69d88a3451193cb242da803db1 (diff)
gentoo auto-resync : 26:02:2023 - 03:55:42
Diffstat (limited to 'dev-python/leechcorepyc/files')
-rw-r--r--dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch13
-rw-r--r--dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch38
2 files changed, 51 insertions, 0 deletions
diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch
new file mode 100644
index 000000000000..945f4e41e1c1
--- /dev/null
+++ b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-cflags.patch
@@ -0,0 +1,13 @@
+Bug: https://bugs.gentoo.org/893824
+--- a/leechcore/Makefile
++++ b/leechcore/Makefile
+@@ -6,7 +6,8 @@
+ # CFLAGS += -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=bounds-strict -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow
+ # CFLAGS += -fsanitize=pointer-compare -fsanitize=pointer-subtract -fanalyzer
+ # DEBUG FLAGS ABOVE
+-CFLAGS += -fPIE -fPIC -pie -fstack-protector -D_FORTIFY_SOURCE=2 -O1 -Wl,-z,noexecstack
++CFLAGS := -D_FORTIFY_SOURCE=2 ${CFLAGS}
++CFLAGS += -fPIE -fPIC -pie -Wl,-z,noexecstack
+ CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -Wno-unused-value -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
+ LDFLAGS += -g -ldl -shared
+ DEPS = leechcore.h
diff --git a/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch
new file mode 100644
index 000000000000..4fdebf98d445
--- /dev/null
+++ b/dev-python/leechcorepyc/files/leechcorepyc-2.14.0-respect-CC.patch
@@ -0,0 +1,38 @@
+--- a/leechcore/Makefile
++++ b/leechcore/Makefile
+@@ -1,5 +1,6 @@
+-CC=gcc
+-CFLAGS += -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthread `pkg-config libusb-1.0 --libs --cflags`
++CC?=gcc
++PKG_CONFIG ?= pkg-config
++CFLAGS += -I. -D LINUX -D _GNU_SOURCE -shared -fPIC -fvisibility=hidden -pthread `$(PKG_CONFIG) libusb-1.0 --libs --cflags`
+ # DEBUG FLAGS BELOW
+ # export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_invalid_pointer_pairs=2
+ # CFLAGS += -g -O0 -Wextra -Wno-unused-parameter -Wno-cast-function-type
+--- a/leechcore_device_rawtcp/Makefile
++++ b/leechcore_device_rawtcp/Makefile
+@@ -1,4 +1,4 @@
+-CC=gcc
++CC?=gcc
+ CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -fvisibility=hidden
+ LDFLAGS += -g -shared
+ DEPS =
+--- a/leechcore_device_sp605tcp/Makefile
++++ b/leechcore_device_sp605tcp/Makefile
+@@ -1,4 +1,4 @@
+-CC=gcc
++CC?=gcc
+ CFLAGS += -I. -I../includes -D LINUX -shared -fPIC -fvisibility=hidden
+ LDFLAGS += -g -shared
+ DEPS =
+--- a/leechcore_ft601_driver_linux/Makefile
++++ b/leechcore_ft601_driver_linux/Makefile
+@@ -1,5 +1,6 @@
+-CC=gcc
+-CFLAGS += -I. -D LINUX -shared -fPIC -fvisibility=hidden `pkg-config libusb-1.0 --libs --cflags`
++CC?=gcc
++PKG_CONFIG ?= pkg-config
++CFLAGS += -I. -D LINUX -shared -fPIC -fvisibility=hidden `$(PKG_CONFIG) libusb-1.0 --libs --cflags`
+ LDFLAGS += -g -shared
+ DEPS = leechcore_ft601_driver_linux.h
+ OBJ = fpga_libusb.o leechcore_ft601_driver_linux.o