public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/statifier/files/, dev-util/statifier/
@ 2018-11-29 21:36 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2018-11-29 21:36 UTC (permalink / raw
  To: gentoo-commits

commit:     461a0284d5e3d05988b20e43411c93330d41ee67
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 29 21:35:12 2018 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Nov 29 21:36:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=461a0284

dev-util/statifier: [QA] Honour CC flags

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/statifier-1.7.4-fix-build-system.patch   | 48 ++++++++++++++++++++++
 dev-util/statifier/statifier-1.7.4.ebuild          | 17 ++++----
 2 files changed, 58 insertions(+), 7 deletions(-)

diff --git a/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch b/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch
new file mode 100644
index 00000000000..ef8c6a516bd
--- /dev/null
+++ b/dev-util/statifier/files/statifier-1.7.4-fix-build-system.patch
@@ -0,0 +1,48 @@
+Honour user flags and CC
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -170,7 +170,7 @@
+ 	echo "VERSION='$(VERSION)'" > $@ || { $(RM) $@; exit 1; }
+  
+ $(UTILS_WITH_ELF_CLASS): $(ELF_CLASS)/%: %.c
+-	gcc $(FLAGS_ELF) -I$(CPU_DIR) -Wall -O2 -g $< -o $@
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) -I$(CPU_DIR) -g $< -o $@
+ 
+ MY_GDB_CFILES := \
+    breakpoints.c \
+@@ -187,13 +187,13 @@
+ 
+ MY_GDB_CPPFLAGS := -I. -I$(CPU_DIR) -I$(ELF_CLASS)
+ $(MY_GDB_OBJ_FILES): $(ELF_CLASS)/%.o: my_gdb/%.c
+-	gcc -c $(FLAGS_ELF) $(MY_GDB_CPPFLAGS) -Wall -O2 -g $< -o $@
++	$(CC) $(CPPFLAGS) $(CFLAGS) -c $(FLAGS_ELF) $(MY_GDB_CPPFLAGS) -g $< -o $@
+ 
+ $(ELF_CLASS)/my_gdb: $(MY_GDB_OBJ_FILES)
+-	gcc $(FLAGS_ELF) $^ -o $@
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) $^ -o $@
+ 
+ $(ELF_CLASS)/dl-var.s: dl-var.c dl-var.inc
+-	gcc $(FLAGS_ELF) $(FLAGS_C_TO_ASM_ELF) -Wall -O2 -S $< -o $@.s
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(FLAGS_ELF) $(FLAGS_C_TO_ASM_ELF) -S $< -o $@.s
+ 	/bin/sh asm.make.sh < $@.s > $@ || { $(RM) $@; exit 1; }
+ 
+ # Dependencies should be in correct order
+@@ -210,7 +210,7 @@
+ # Because linker give warning about _start function I specify
+ # pretty dummy '--entry=0x0'
+ $(FILES_TO_BE_EMBEDDED_WITH_ELF_CLASS): $(ELF_CLASS)/%: $(ELF_CLASS)/%.o
+-	gcc $(FLAGS_ELF) -o $@ $< -Wl,--oformat,binary,--entry=0x0 -nostdlib
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(FLAGS_ELF) -o $@ $< -Wl,--oformat,binary,--entry=0x0 -nostdlib
+ 
+ OBJECTS_TO_BE_EMBEDDED_WITH_ELF_CLASS = $(addsuffix .o,$(FILES_TO_BE_EMBEDDED_WITH_ELF_CLASS))
+ 
+@@ -221,7 +221,7 @@
+ # with -include processor.h, start.S and $<
+ # 
+ $(OBJECTS_TO_BE_EMBEDDED_WITH_ELF_CLASS): $(ELF_CLASS)/%.o: $(CPU_DIR)/%.S $(CPU_DIR)/processor.h ./start.S ./end.S
+-	gcc $(FLAGS_ELF) -c -o $@ -nostdinc -I$(CURDIR) -I$(CURDIR)/$(ELF_CLASS) -include $(CPU_DIR)/processor.h -include ./start.S -include $< ./end.S
++	$(CC) $(CPPFLAGS) $(CFLAGS) $(FLAGS_ELF) -c -o $@ -nostdinc -I$(CURDIR) -I$(CURDIR)/$(ELF_CLASS) -include $(CPU_DIR)/processor.h -include ./start.S -include $< ./end.S
+ 
+ # Additional dependencies:
+ $(ELF_CLASS)/regs.o: $(ELF_CLASS)/regs.inc

diff --git a/dev-util/statifier/statifier-1.7.4.ebuild b/dev-util/statifier/statifier-1.7.4.ebuild
index 08b4f7afec9..b4021f0a1cf 100644
--- a/dev-util/statifier/statifier-1.7.4.ebuild
+++ b/dev-util/statifier/statifier-1.7.4.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
 
 MULTILIB_COMPAT=( abi_x86_{32,64} )
 
-inherit multilib-build
+inherit multilib-build toolchain-funcs
 
 DESCRIPTION="Statifier is a tool for creating portable, self-containing Linux executables"
 HOMEPAGE="http://statifier.sourceforge.net"
@@ -20,20 +20,23 @@ RDEPEND="app-shells/bash
 	sys-apps/coreutils
 	virtual/awk"
 
-src_prepare() {
+PATCHES=(
 	# Respect users CFLAGS and LDFLAGS
-	sed -i -e 's/-Wall -O2/$(CFLAGS) $(LDFLAGS)/g' src/Makefile || die
+	"${FILESDIR}"/${PN}-1.7.4-fix-build-system.patch
+)
+
+src_prepare() {
+	default
 
 	# Don't compile 32-bit on amd64 no-multilib profile
 	if ! use abi_x86_32; then
 		sed -i -e 's/ELF32 .*/ELF32 := no/g' configs/config.x86_64 || die
 	fi
-
-	# Apply user patches
-	eapply_user
 }
 
 src_configure() {
+	tc-export CC
+
 	# Fix permissions, as configure is not marked executable
 	chmod +x configure || die
 	econf


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/statifier/files/, dev-util/statifier/
@ 2020-08-27 20:59 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2020-08-27 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     102a02616132258cb9e6715264bd7a8a6ddac868
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 27 20:53:04 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Thu Aug 27 20:59:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=102a0261

dev-util/statifier: fix compilation with musl

Closes: https://bugs.gentoo.org/713604
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../statifier/files/statifier-1.7.4-musl.patch     | 28 ++++++++++++++++++++++
 dev-util/statifier/statifier-1.7.4-r1.ebuild       |  1 +
 dev-util/statifier/statifier-1.7.4.ebuild          |  1 +
 3 files changed, 30 insertions(+)

diff --git a/dev-util/statifier/files/statifier-1.7.4-musl.patch b/dev-util/statifier/files/statifier-1.7.4-musl.patch
new file mode 100644
index 00000000000..919f354127b
--- /dev/null
+++ b/dev-util/statifier/files/statifier-1.7.4-musl.patch
@@ -0,0 +1,28 @@
+--- a/src/my_gdb/my_ptrace.c
++++ b/src/my_gdb/my_ptrace.c
+@@ -13,8 +13,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
++typedef int statifier_ptrace_req_t;
++
+ long my_ptrace(
+-	enum __ptrace_request request,
++	statifier_ptrace_req_t request,
+ 	pid_t                 pid,
+ 	void                 *addr,
+ 	void                 *data,
+--- a/src/my_gdb/my_ptrace.h
++++ b/src/my_gdb/my_ptrace.h
+@@ -15,8 +15,10 @@
+ #include <sys/types.h>
+ #include <sys/ptrace.h>
+ 
++typedef int statifier_ptrace_req_t;
++
+ long my_ptrace(
+-	enum __ptrace_request request,
++	statifier_ptrace_req_t request,
+ 	pid_t                 pid,
+ 	void                 *addr,
+ 	void                 *data,

diff --git a/dev-util/statifier/statifier-1.7.4-r1.ebuild b/dev-util/statifier/statifier-1.7.4-r1.ebuild
index b986e79dd44..5bdd7e9ca4e 100644
--- a/dev-util/statifier/statifier-1.7.4-r1.ebuild
+++ b/dev-util/statifier/statifier-1.7.4-r1.ebuild
@@ -24,6 +24,7 @@ RDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.7.4-clang.patch
 	"${FILESDIR}"/${PN}-1.7.4-fix-build-system.patch
+	"${FILESDIR}"/${PN}-1.7.4-musl.patch
 )
 
 src_prepare() {

diff --git a/dev-util/statifier/statifier-1.7.4.ebuild b/dev-util/statifier/statifier-1.7.4.ebuild
index 74c850e0b93..7ade05bbc42 100644
--- a/dev-util/statifier/statifier-1.7.4.ebuild
+++ b/dev-util/statifier/statifier-1.7.4.ebuild
@@ -24,6 +24,7 @@ RDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.7.4-clang.patch
 	"${FILESDIR}"/${PN}-1.7.4-fix-build-system.patch
+	"${FILESDIR}"/${PN}-1.7.4-musl.patch
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-27 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-27 20:59 [gentoo-commits] repo/gentoo:master commit in: dev-util/statifier/files/, dev-util/statifier/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2018-11-29 21:36 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox