package/memtester: fix compile and link flags
authorBaruch Siach <baruch@tkos.co.il>
Mon, 8 Feb 2021 09:04:34 +0000 (11:04 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 8 Feb 2021 15:24:38 +0000 (16:24 +0100)
The memtester build system does not use CFLAGS/LDFLAGS variables.
Everything should be written to conf-cc and conf-ld.

Use '%' as sed expression delimiter because comma might appear in
LDFLAGS.

Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/memtester/memtester.mk

index 49cc935f39665bfd8e7d9550f27921854d58464d..ec515f63927f699ecc222b1dfe2bcc3c31612ca6 100644 (file)
@@ -13,8 +13,9 @@ MEMTESTER_CPE_ID_VENDOR = pryopus
 MEMTESTER_TARGET_INSTALL_OPTS = INSTALLPATH=$(TARGET_DIR)/usr
 
 define MEMTESTER_BUILD_CMDS
-       $(SED) "s,^cc,$(TARGET_CC)," $(@D)/conf-*
-       $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+       $(SED) "s%^cc%$(TARGET_CC) $(TARGET_CFLAGS)%" $(@D)/conf-cc
+       $(SED) "s%^cc%$(TARGET_CC) $(TARGET_LDFLAGS)%" $(@D)/conf-ld
+       $(MAKE) -C $(@D)
 endef
 
 define MEMTESTER_INSTALL_TARGET_CMDS