Skip to contentSkip to conversation

Custom package using buildroot-linux-uclibc-g++

Buildroot AAlex_ 2 participants 4 messages Feb 12, 2018 – Feb 13, 2018 1 message not in the archive

lore
Share & tools
lore

AAlex_

author
#0 lore raw

Hi,
i created a custom package like the libfoo example.
Using $(eval $(generic-package))
The makefile extracts objects from archive and should link them to a so. Buildroot is using x86_64-buildroot-linux-uclibc-gcc but this doesnt work (source is c++).
How can i define that the x86_64-buildroot-linux-uclibc-g++ (which is availalble in host/bin) is used instead of the x86_64-buildroot-linux-uclibc-gcc for this package?

Regards Alex

--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/

#1 lore raw

Hello,

Quoted 8 lines · AAlex_

i created a custom package like the libfoo example.
Using $(eval $(generic-package))
The makefile extracts objects from archive and should link them to a so. Buildroot is using x86_64-buildroot-linux-uclibc-gcc but this doesnt work (source is c++).
How can i define that the x86_64-buildroot-linux-uclibc-g++ (which is availalble in host/bin) is used instead of the x86_64-buildroot-linux-uclibc-gcc for this package?

Use TARGET_CXX instead of TARGET_CC. But without seeing your actual package .mk file it is hard to say. Could you post your .mk file ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
#3 lore raw
In reply to a message not in the archive

Hello,

Please keep the Buildroot mailing list in Cc. I've re-added it.

Quoted 9 lines · earthquake.de at freenet.de

Hello,
thanks for your help.
With CXX the link works! I use my own makefile and call CXX.

mk-file:
CUSTOM_LIB_VERSION = 1.4.3
CUSTOM_LIB_SITE = $(BR2_EXTERNAL_CUSTOM_PATH)/package/custom_lib CUSTOM_LIB_SITE_METHOD = local
CUSTOM_LIB_STAGING = YES

This should be:

CUSTOM_LIB_INSTALL_STAGING = YES

Quoted 6 lines

define CUSTOM_LIB_BUILD_CMDS

     $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f Makefile-custom_lib all
     $(INSTALL) -D -m 0755 $(@D)/libcustom.so* $(STAGING_DIR)/usr/lib/

endef

A further issue is that the CUSTOM_LIB_INSTALL_STAGING_CMDS will not be called so i do the staging action in the build action (you see above) .

Which will solve this problem.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com