diff options
| author | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-10-21 13:54:14 +0200 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-10-21 16:26:54 +0200 |
| commit | 6300de5464989f2dd07ee86a3589cd05e5184bb0 (patch) | |
| tree | 67cf587c932a3d2be797fc5f7bbb63ec815b624c /package/gcc/gcc-final | |
| parent | 076fd27da721971f44f681d5a06f68496371d96a (diff) | |
| download | buildroot-6300de5464989f2dd07ee86a3589cd05e5184bb0.tar.gz buildroot-6300de5464989f2dd07ee86a3589cd05e5184bb0.zip | |
package/gcc: introduce BR2_GCC_SUPPORTS_LIBCILKRTS
libcilkrts was introduced in gcc 4.9, and removed in gcc
8.x. Therefore, it does not make sense to pass --disable-libcilkrts in
gcc 8.x and higher. This commit introduces BR2_GCC_SUPPORTS_LIBCILKRTS
that allows the makefile code to know if the selected gcc version
supports libcilkrts or not.
This new option mainly allows to annotate the fact that libcilkrts
exists in gcc [4.9, 7] and that once we have dropped support for those
gcc versions, the libcilkrts related logic can be removed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/gcc/gcc-final')
| -rw-r--r-- | package/gcc/gcc-final/gcc-final.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index 1be0b9bfc9..cbde56ce1c 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -76,6 +76,8 @@ HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4a,m4a-nofpu" HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib/!m4* endif +ifeq ($(BR2_GCC_SUPPORTS_LIBCILKRTS),y) + # libcilkrts does not support v8 ifeq ($(BR2_sparc),y) HOST_GCC_FINAL_CONF_OPTS += --disable-libcilkrts @@ -86,10 +88,16 @@ ifeq ($(BR2_PTHREADS_NONE),y) HOST_GCC_FINAL_CONF_OPTS += --disable-libcilkrts endif +ifeq ($(BR2_STATIC_LIBS),y) +# disable libcilkrts as there is no static version +HOST_GCC_FINAL_CONF_OPTS += --disable-libcilkrts +endif + +endif # BR2_GCC_SUPPORTS_LIBCILKRTS + # Disable shared libs like libstdc++ if we do static since it confuses linking -# In that case also disable libcilkrts as there is no static version ifeq ($(BR2_STATIC_LIBS),y) -HOST_GCC_FINAL_CONF_OPTS += --disable-shared --disable-libcilkrts +HOST_GCC_FINAL_CONF_OPTS += --disable-shared else HOST_GCC_FINAL_CONF_OPTS += --enable-shared endif |

