2024-01-31 12:22:16 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# newlib-bare-metal
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2024-03-01 19:37:56 +01:00
|
|
|
NEWLIB_BARE_METAL_VERSION = 4.4.0.20231231
|
2024-01-31 12:22:16 +01:00
|
|
|
NEWLIB_BARE_METAL_SITE = ftp://sourceware.org/pub/newlib
|
2024-03-01 19:37:56 +01:00
|
|
|
NEWLIB_BARE_METAL_SOURCE = newlib-$(NEWLIB_BARE_METAL_VERSION).tar.gz
|
2024-01-31 12:22:16 +01:00
|
|
|
NEWLIB_BARE_METAL_DEPENDENCIES = host-gcc-bare-metal
|
|
|
|
NEWLIB_BARE_METAL_ADD_TOOLCHAIN_DEPENDENCY = NO
|
|
|
|
NEWLIB_BARE_METAL_LICENSE = GPL-2.0, GPL-3.0, LGPL-2.1, LGPL-3.0
|
|
|
|
NEWLIB_BARE_METAL_LICENSE_FILES = \
|
|
|
|
COPYING \
|
|
|
|
COPYING.LIB \
|
|
|
|
COPYING.LIBGLOSS \
|
|
|
|
COPYING.NEWLIB
|
2024-03-01 20:40:51 +01:00
|
|
|
NEWLIB_BARE_METAL_CPE_ID_VENDOR = newlib_project
|
|
|
|
NEWLIB_BARE_METAL_CPE_ID_PRODUCT = newlib
|
2024-01-31 12:22:16 +01:00
|
|
|
|
|
|
|
NEWLIB_BARE_METAL_INSTALL_STAGING = YES
|
|
|
|
NEWLIB_BARE_METAL_INSTALL_TARGET = NO
|
2024-03-01 18:50:56 +01:00
|
|
|
NEWLIB_BARE_METAL_MAKE_OPTS = MAKEINFO=true
|
2024-01-31 12:22:16 +01:00
|
|
|
|
|
|
|
define NEWLIB_BARE_METAL_CONFIGURE_CMDS
|
|
|
|
(cd $(@D) && \
|
|
|
|
PATH=$(BR_PATH) \
|
|
|
|
./configure \
|
|
|
|
--target=$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--enable-newlib-io-c99-formats \
|
|
|
|
--enable-newlib-io-long-long \
|
|
|
|
--enable-newlib-io-float \
|
|
|
|
--enable-newlib-io-long-double \
|
|
|
|
--disable-multilib \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define NEWLIB_BARE_METAL_BUILD_CMDS
|
2024-03-01 18:50:56 +01:00
|
|
|
PATH=$(BR_PATH) $(MAKE1) $(NEWLIB_BARE_METAL_MAKE_OPTS) -C $(@D)
|
2024-01-31 12:22:16 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define NEWLIB_BARE_METAL_INSTALL_STAGING_CMDS
|
2024-03-01 18:50:56 +01:00
|
|
|
PATH=$(BR_PATH) $(MAKE1) -C $(@D) $(NEWLIB_BARE_METAL_MAKE_OPTS) \
|
|
|
|
DESTDIR=$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT) install
|
2024-01-31 12:22:16 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define NEWLIB_BARE_METAL_FIXUP
|
|
|
|
mv $(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT)/usr/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)/include \
|
|
|
|
$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT)/usr/include
|
|
|
|
mv $(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT)/usr/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)/lib \
|
|
|
|
$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT)/usr/lib
|
|
|
|
endef
|
|
|
|
NEWLIB_BARE_METAL_POST_INSTALL_STAGING_HOOKS += NEWLIB_BARE_METAL_FIXUP
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|