Skip to contentSkip to conversation

package/dmalloc: cleanups and ssp workaround (branch yem/dmalloc)

PATCH Applied Yann E. MORIN 2 participants 3 messages Feb 8, 2023 – Feb 16, 2023

lore
Share & tools
lore
#0 lore raw

v2 cover package/dmalloc: cleanups and ssp workaround (branch yem/dmalloc)

Hello All!

This short series cleans up (a bit) our dmalloc package, and disables SSP altogether to avoid build failures due to limitations in the dmalloc build system.

Changes v1 > v2:
- explain why we patch both configure and configure.ac

Regards,
Yann E. MORIN.

----------------------------------------------------------------
Yann E. MORIN (3):
package/dmalloc: convert existing patch to git format package/dmalloc: use actual patches rather than sed-ing package/dmalloc: don't use SSP

 .../dmalloc/0001-configure-fix-build-on-mips.patch | 90 ++++++++++++++++++++++
 package/dmalloc/0001-mips.patch                    | 45 -----------
 ...003-configure-allow-overriding-some-tests.patch | 80 +++++++++++++++++++
 ...e-the-configure-detected-or-user-supplied.patch | 50 ++++++++++++
 ...onfigure-use-LD-instead-of-hard-coding-ld.patch | 67 ++++++++++++++++
 package/dmalloc/dmalloc.mk                         | 24 +++---
 6 files changed, 299 insertions(+), 57 deletions(-)
 create mode 100644 package/dmalloc/0001-configure-fix-build-on-mips.patch
 delete mode 100644 package/dmalloc/0001-mips.patch
 create mode 100644 package/dmalloc/0003-configure-allow-overriding-some-tests.patch
 create mode 100644 package/dmalloc/0004-Makefile-use-the-configure-detected-or-user-supplied.patch
 create mode 100644 package/dmalloc/0005-configure-use-LD-instead-of-hard-coding-ld.patch
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 1/3 package/dmalloc: convert existing patch to git format

We're going to add more patches, so let's cleanup our historical baggage...

Cc Fabrice Fontaine <[email protected]>
---
 .../0001-configure-fix-build-on-mips.patch    | 90 +++++++++++++++++++
 package/dmalloc/0001-mips.patch               | 45 ----------
 2 files changed, 90 insertions(+), 45 deletions(-)
 create mode 100644 package/dmalloc/0001-configure-fix-build-on-mips.patch
 delete mode 100644 package/dmalloc/0001-mips.patch
package/dmalloc/0001-configure-fix-build-on-mips.patch new file +90 -0
new file mode 100644
index 0000000000..9b1525d0d1
@@ -0,0 +1,90 @@
+From af6adb3f5f05be4faa88a5aa83296c388c8085e7 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Wed, 8 Feb 2023 12:30:10 +0100
+Subject: [PATCH] configure: fix build on mips
+
+This patch is a historical baggage that Buildroot has carried for ages
+(since 2006), and the reason for it are notentirely clear.
+
+Since dmalloc is pretty tricky, and as this patch has not been
+identified as causing issues, we keep it; we just add the configure.ac
+patchlet to match the one in configure.
+
+As for the title, the original patch was named dmalloc-mips.patch, so
+presumably it fixes some mips issue; let's title the commit that way.
+
+[Fabrice: Updated for 5.6.5]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[[email protected]: make it a git-formatted patch]
+Signed-off-by: Yann E. MORIN <[email protected]>
+---
+ configure    |  4 ++--
+ configure.ac |  2 +-
+ return.h     | 16 +++-------------
+ 3 files changed, 6 insertions(+), 16 deletions(-)
+
+diff --git a/configure b/configure
+index d52a1e8..c18dfb2 100755
+--- a/configure
++++ b/configure
+@@ -5413,8 +5413,8 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return.h macros work" >&5
+ $as_echo_n "checking return.h macros work... " >&6; }
+ if test "$cross_compiling" = yes; then :
+-   $as_echo "#define RETURN_MACROS_WORK 0" >>confdefs.h
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++   $as_echo "#define RETURN_MACROS_WORK 1" >>confdefs.h
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume yes (cross-compiling)" >&5
+ $as_echo "no" >&6; }
+ 
+ else
+diff --git a/configure.ac b/configure.ac
+index a5295f1..9740fdc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -705,7 +705,7 @@ int main()
+ ])],
+ [ AC_DEFINE(RETURN_MACROS_WORK, 1) AC_MSG_RESULT([yes]) ],
+ [ AC_DEFINE(RETURN_MACROS_WORK, 0) AC_MSG_RESULT([no]) ],
+-[ AC_DEFINE(RETURN_MACROS_WORK, 0) AC_MSG_RESULT([no]) ]
++[ AC_DEFINE(RETURN_MACROS_WORK, 1) AC_MSG_RESULT([assume yes (cross-compiling)]) ]
+ )
+ 
+ ##############################################################################
+diff --git a/return.h b/return.h
+index 9d3f5f1..d916c7a 100644
+--- a/return.h
++++ b/return.h
+@@ -117,26 +117,16 @@
+ /*************************************/
+ 
+ /*
+- * For DEC Mips machines running Ultrix
++ * For Mips machines running Linux
+  */
+ #if __mips
+ 
+-/*
+- * I have no idea how to get inline assembly with the default cc.
+- * Anyone know how?
+- */
+-
+-#if 0
+-
+ /*
+  * NOTE: we assume here that file is global.
+  *
+- * $31 is the frame pointer.  $2 looks to be the return address but maybe
+- * not consistently.
++ * $31 is the return address.
+  */
+-#define GET_RET_ADDR(file)	asm("sw $2, file")
+-
+-#endif
++#define GET_RET_ADDR(file)	asm("sw $31, %0" : "=m" (file))
+ 
+ #endif /* __mips */
+ 
+-- 
+2.25.1
+
package/dmalloc/0001-mips.patch deleted +0 -45

45 lines not on this page · raw message

Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Yann E. MORIN
Quoted 4 lines · On Wed, 8 Feb 2023 20:31:31 +0100 "Yann E. MORIN" <[email protected]>…

Yann E. MORIN (3):
package/dmalloc: convert existing patch to git format package/dmalloc: use actual patches rather than sed-ing package/dmalloc: don't use SSP

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot