[meta-oe,master] tcsh: fix compile error after LDFLAGS change

Submitted by Tony Battersby on Aug. 10, 2021, 7:44 p.m. | Patch ID: 180030

Details

Message ID b8e3c972-3d43-1a40-1bbe-bc4fe12dd021@cybernetics.com
State Accepted
Commit 48596d4db3b25e7d50c441857dd60f0f0a4c169e
Headers show

Commit Message

Tony Battersby Aug. 10, 2021, 7:44 p.m.
Adding -f*-prefix-map to LDFLAGS caused the following issue when
compiling tcsh on Ubuntu 18.04:

gcc: error: unrecognized command line option ‘-fmacro-prefix-map=...’

Fix by using BUILD_LDFLAGS instead of LDFLAGS for gethost.

[YOCTO #14481]

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---

NOTE: tested only on Ubuntu 20.04.

 meta-oe/recipes-shells/tcsh/tcsh_6.22.04.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-shells/tcsh/tcsh_6.22.04.bb b/meta-oe/recipes-shells/tcsh/tcsh_6.22.04.bb
index ac6c6db81..c4da5cd83 100644
--- a/meta-oe/recipes-shells/tcsh/tcsh_6.22.04.bb
+++ b/meta-oe/recipes-shells/tcsh/tcsh_6.22.04.bb
@@ -20,7 +20,7 @@  EXTRA_OEMAKE += "CC_FOR_GETHOST='${BUILD_CC}'"
 inherit autotools
 
 do_compile:prepend() {
-    oe_runmake CC_FOR_GETHOST='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' gethost
+    oe_runmake CC_FOR_GETHOST='${BUILD_CC}' CFLAGS='${BUILD_CFLAGS}' LDFLAGS='${BUILD_LDFLAGS}' gethost
 }
 
 do_install:append () {