Files
poky/meta/conf/distro/include/tclibc-newlib.inc
Nathan Rossi a71dbdee2f tclibc: For newlib and baremetal disable some security features
With GCCPIE being enabled by default with security_flags.inc the
compiler will by default attempt to compile and link programs as PIE.
The targets that use newlib and baremetal in general do not support PIE
or are otherwise unable to use it due to how embedded targets are
compiled and executed. As such it makes sense to disable PIE by default
for these libc's in order to prevent build failures.

For baremetal tclibc there are no libc features or implementation as
such there is no implementation for the strong stack protector by
default.

(From OE-Core rev: dfe434b793c156a87b5ead5cb85fe60d920d69d3)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-11 09:05:35 +01:00

49 lines
1.4 KiB
PHP

#
# Newlib configuration
#
LIBCEXTENSION = "-newlib"
LIBCOVERRIDE = ":libc-newlib"
PREFERRED_PROVIDER_virtual/libc ?= "newlib"
PREFERRED_PROVIDER_virtual/libiconv ?= "newlib"
PREFERRED_PROVIDER_virtual/libintl ?= "newlib"
PREFERRED_PROVIDER_virtual/nativesdk-libintl ?= "nativesdk-glibc"
PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "ldconfig"
#USE_NLS ?= "no"
IMAGE_LINGUAS = ""
LIBC_DEPENDENCIES = "\
newlib-dbg \
newlib-dev \
libgloss \
libgloss-dev \
libgloss-dbg \
libgcc-dev \
libgcc-dbg \
"
# compilerlibs defaults to gcc-runtime, but we get runtime from libgloss
# we set ASSUME_PROVIDED because we cant set PREFERRED_PROVIDER
# for compilerlibs since its overridden by tcmode-default
ASSUME_PROVIDED += "virtual/${TARGET_PREFIX}compilerlibs virtual/crypt"
# Its useful to be able to extend newlib, but we dont provide a native variant of libgloss
NEWLIB_EXTENDED ?= "libgloss libgcc"
BASE_DEFAULT_DEPS_append_class-target = " ${NEWLIB_EXTENDED}"
TARGET_OS = "elf"
TARGET_OS_arm = "eabi"
TOOLCHAIN_HOST_TASK ?= "packagegroup-cross-canadian-${MACHINE}"
TOOLCHAIN_TARGET_TASK ?= "${LIBC_DEPENDENCIES}"
TOOLCHAIN_NEED_CONFIGSITE_CACHE_remove = "zlib ncurses"
# disable pie security flags by default
SECURITY_CFLAGS_libc-newlib = "${SECURITY_NOPIE_CFLAGS}"
SECURITY_LDFLAGS_libc-newlib = ""