Skip to contentSkip to conversation

package/linux-tools: rtla: Pass TARGET_LD to the make arguments

PATCH Applied Maxime Chevallier via buildroot 2 participants 5 messages Jun 23, 2025 – Jul 4, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/linux-tools: rtla: Pass TARGET_LD to the make arguments

In Linux v6.8, the rtla Makefile was rewritten :

01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

The new Makefile uses default linker values, so the host linker being used to produce the final rtla binary.

This results in the following error :

ld: [...] trace.o: error adding symbols: file in wrong format

Add LD=$(TARGET_LD) to the RTLA_MAKE_OPTS to fix rtla cross-compilation.

---
 package/linux-tools/linux-tool-rtla.mk.in | 1 +
 1 file changed, 1 insertion(+)
package/linux-tools/linux-tool-rtla.mk.in +1 -0
index 449371ddfe..d9bdcc3016 100644
@@ -9,6 +9,7 @@ LINUX_TOOLS += rtla
 RTLA_DEPENDENCIES = host-pkgconf libtracefs
 RTLA_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
 	CC=$(TARGET_CC) \
+	LD=$(TARGET_LD) \
 	EXTRA_CFLAGS="-D_GNU_SOURCE" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v1 1/1
#1 lore raw

Hi Maxime,

Quoted 7 lines · Maxime Chevallier

In Linux v6.8, the rtla Makefile was rewritten :

01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

The new Makefile uses default linker values, so the host linker being used to produce the final rtla binary.

Quoted 7 lines

This results in the following error :

ld: [...] trace.o: error adding symbols: file in wrong format

Add LD=$(TARGET_LD) to the RTLA_MAKE_OPTS to fix rtla cross-compilation.

Best regards

Signature · 2 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
Quoted 9 lines
---
  package/linux-tools/linux-tool-rtla.mk.in | 1 +
  1 file changed, 1 insertion(+)
package/linux-tools/linux-tool-rtla.mk.in +0 -0
index 449371ddfe..d9bdcc3016 100644

package/linux-tools/linux-tool-rtla.mk.in LINUX_TOOLS += rtla · line 15

Quoted 7 lines
package/linux-tools/linux-tool-rtla.mk.in +1 -0
@@ -9,6 +9,7 @@ LINUX_TOOLS += rtla
  RTLA_DEPENDENCIES = host-pkgconf libtracefs
  RTLA_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
  	CC=$(TARGET_CC) \
+	LD=$(TARGET_LD) \
  	EXTRA_CFLAGS="-D_GNU_SOURCE" \
  	LDFLAGS="$(TARGET_LDFLAGS)" \
  	PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Maxime Chevallier via buildroot
Quoted 7 lines · Maxime Chevallier via buildroot

In Linux v6.8, the rtla Makefile was rewritten :

01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

The new Makefile uses default linker values, so the host linker being used to produce the final rtla binary.

Quoted 7 lines

This results in the following error :

ld: [...] trace.o: error adding symbols: file in wrong format

Add LD=$(TARGET_LD) to the RTLA_MAKE_OPTS to fix rtla cross-compilation.

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Maxime Chevallier via buildroot

In reply of:

Quoted 7 lines

In Linux v6.8, the rtla Makefile was rewritten :

01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

The new Makefile uses default linker values, so the host linker being used to produce the final rtla binary.

Quoted 7 lines

This results in the following error :

ld: [...] trace.o: error adding symbols: file in wrong format

Add LD=$(TARGET_LD) to the RTLA_MAKE_OPTS to fix rtla cross-compilation.

Applied to 2025.02.x. Thanks

Quoted 23 lines
---
 package/linux-tools/linux-tool-rtla.mk.in | 1 +
 1 file changed, 1 insertion(+)
package/linux-tools/linux-tool-rtla.mk.in +1 -0
index 449371ddfe..d9bdcc3016 100644
@@ -9,6 +9,7 @@ LINUX_TOOLS += rtla
 RTLA_DEPENDENCIES = host-pkgconf libtracefs
 RTLA_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
 	CC=$(TARGET_CC) \
+	LD=$(TARGET_LD) \
 	EXTRA_CFLAGS="-D_GNU_SOURCE" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Maxime Chevallier via buildroot

In reply of:

Quoted 7 lines

In Linux v6.8, the rtla Makefile was rewritten :

01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")

The new Makefile uses default linker values, so the host linker being used to produce the final rtla binary.

Quoted 7 lines

This results in the following error :

ld: [...] trace.o: error adding symbols: file in wrong format

Add LD=$(TARGET_LD) to the RTLA_MAKE_OPTS to fix rtla cross-compilation.

Applied to 2025.05.x. Thanks

Quoted 23 lines
---
 package/linux-tools/linux-tool-rtla.mk.in | 1 +
 1 file changed, 1 insertion(+)
package/linux-tools/linux-tool-rtla.mk.in +1 -0
index 449371ddfe..d9bdcc3016 100644
@@ -9,6 +9,7 @@ LINUX_TOOLS += rtla
 RTLA_DEPENDENCIES = host-pkgconf libtracefs
 RTLA_MAKE_OPTS = $(LINUX_MAKE_FLAGS) \
 	CC=$(TARGET_CC) \
+	LD=$(TARGET_LD) \
 	EXTRA_CFLAGS="-D_GNU_SOURCE" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig
Signature · 6 lines
2.49.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot