All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/9] core/legal-info: don't require overriding _LICENSE
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it Yann E. MORIN
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Currently, the formatting we impose on the _LICENSE variable requires
that we also use the seldom used := assignment operator, which makes
the _LICENSE variable the only variable that users have to write with
this operator.

This really departs from the simplicity and consistency of using the
append-assignment, which we use for every other variables.

This is because the append-assignment operator surreptiotiously
introduces a sapce between the original value and the append one. But
we can use this knowledge, to match any instance of a space followed by
a comma, and turn it into a single comma.

This allows users to now have a consistent use of the '=' and '+='
operators we use everywhere else in .mk files.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 docs/manual/adding-packages-generic.txt | 16 ++++++++++------
 package/pkg-generic.mk                  |  2 +-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index b402767b05..b2386f2c01 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -429,13 +429,17 @@ not and can not work as people would expect it should:
   the +license+ field of the manifest file for this package. +
   The expected format for this variable must comply with the following rules:
   ** If different parts of the package are released under different
-  licenses, then +comma+ separate licenses (e.g. +`LIBFOO_LICENSE =
-  GPL-2.0+, LGPL-2.1+`+). If there is clear distinction between which
-  component is licensed under what license, then annotate the license
-  with that component, between parenthesis (e.g. +`LIBFOO_LICENSE =
-  GPL-2.0+ (programs), LGPL-2.1+ (libraries)`+).
+     licenses, then +comma+ separate licenses (e.g. +`LIBFOO_LICENSE =
+     GPL-2.0+, LGPL-2.1+`+). If there is clear distinction between which
+     component is licensed under what license, then annotate the license
+     with that component, between parenthesis (e.g. +`LIBFOO_LICENSE =
+     GPL-2.0+ (programs), LGPL-2.1+ (libraries)`+).
+  ** If some licenses are conditioned on a sub-option being enabled, append
+     the conditional licenses with a comma (e.g.: `FOO_LICENSE += , GPL-2.0+
+     (programs)`); the infrastructure will internally remove the space before
+     the comma.
   ** If the package is dual licensed, then separate licenses with the
-  +or+ keyword (e.g. +`LIBFOO_LICENSE = AFL-2.1 or GPL-2.0+`+).
+     +or+ keyword (e.g. +`LIBFOO_LICENSE = AFL-2.1 or GPL-2.0+`+).
 
 * +LIBFOO_LICENSE_FILES+ is a space-separated list of files in the package
   tarball that contain the license(s) under which the package is released.
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 1f24b52a69..893faba22a 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1006,7 +1006,7 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
 endif # redistribute
 
 endif # other packages
-	@$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1)))
+	@$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$(subst $$(space)$$(comma),$$(comma),$$($(2)_LICENSE)),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1)))
 endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
 	$$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep))
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 1/9] core/legal-info: don't require overriding _LICENSE Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-27  9:40   ` Arnout Vandecappelle
  2019-10-26  8:45 ` [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE Yann E. MORIN
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Now that the infra takes care of removing extraneous spaces before
commas, we can safely append to LICENSE variables.

This removes the only case where we had to use immediate assignment
to append to a variable.

Mechanical change, with:

    $ sed -r -i -e 's/\<([^[:space:]]+_LICENSE) := \$\(\1\),/\1 += ,/' \
        $(git grep -l -E '\<([^[:space:]]+_LICENSE) := \$\(\1\),')

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

---
Note: I really said "where we _had_ to". There are other places where we
do use immediate assignment, but where we don't have to; further patches
will take care of that too.
---
 package/dtc/dtc.mk                                      | 2 +-
 package/elfutils/elfutils.mk                            | 2 +-
 package/freeswitch/freeswitch.mk                        | 6 +++---
 package/gnutls/gnutls.mk                                | 2 +-
 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 6 +++---
 package/iwd/iwd.mk                                      | 2 +-
 package/kmod/kmod.mk                                    | 2 +-
 package/kodi/kodi.mk                                    | 2 +-
 package/libidn2/libidn2.mk                              | 2 +-
 package/libuci/libuci.mk                                | 2 +-
 package/qt5/qt5base/qt5base.mk                          | 4 ++--
 package/qt5/qt5connectivity/qt5connectivity.mk          | 2 +-
 package/qt5/qt5enginio/qt5enginio.mk                    | 2 +-
 package/qt5/qt5multimedia/qt5multimedia.mk              | 2 +-
 package/qt5/qt5scxml/qt5scxml.mk                        | 2 +-
 package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk    | 8 ++++----
 package/qt5/qt5webchannel/qt5webchannel.mk              | 2 +-
 package/qt5/qt5websockets/qt5websockets.mk              | 2 +-
 package/qt5/qt5webview/qt5webview.mk                    | 2 +-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk            | 2 +-
 package/sg3_utils/sg3_utils.mk                          | 2 +-
 package/usbredir/usbredir.mk                            | 2 +-
 22 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk
index 0ed914ba41..a0fffa5b80 100644
--- a/package/dtc/dtc.mk
+++ b/package/dtc/dtc.mk
@@ -36,7 +36,7 @@ endef
 
 ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y)
 
-DTC_LICENSE := $(DTC_LICENSE), GPL-2.0+ (programs)
+DTC_LICENSE += , GPL-2.0+ (programs)
 DTC_INSTALL_GOAL = install
 ifeq ($(BR2_PACKAGE_BASH),)
 DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF
diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk
index 29cfdc2159..c3df7303b7 100644
--- a/package/elfutils/elfutils.mk
+++ b/package/elfutils/elfutils.mk
@@ -72,7 +72,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y)
 ELFUTILS_CONF_OPTS += --enable-progs
-ELFUTILS_LICENSE := $(ELFUTILS_LICENSE), GPL-3.0+ (programs)
+ELFUTILS_LICENSE += , GPL-3.0+ (programs)
 ELFUTILS_LICENSE_FILES += COPYING
 else
 ELFUTILS_CONF_OPTS += --disable-progs
diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk
index 4736ef4531..41f298a313 100644
--- a/package/freeswitch/freeswitch.mk
+++ b/package/freeswitch/freeswitch.mk
@@ -164,7 +164,7 @@ FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES
 # mod_isac supports a limited set of archs
 # src/mod/codecs/mod_isac/typedefs.h
 ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y)
-FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3-Clause (mod_isac)
+FREESWITCH_LICENSE += , BSD-3-Clause (mod_isac)
 FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE
 FREESWITCH_ENABLED_MODULES += codecs/mod_isac
 endif
@@ -221,7 +221,7 @@ FREESWITCH_ENABLED_MODULES += applications/mod_memcache
 endif
 
 ifeq ($(BR2_PACKAGE_LIBOPENH264),y)
-FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-2-Clause (libopenh264)
+FREESWITCH_LICENSE += , BSD-2-Clause (libopenh264)
 FREESWITCH_LICENSE_FILES += docs/OPENH264_BINARY_LICENSE.txt
 FREESWITCH_DEPENDENCIES += libopenh264
 FREESWITCH_ENABLED_MODULES += codecs/mod_openh264
@@ -303,7 +303,7 @@ FREESWITCH_DEPENDENCIES += xz
 endif
 
 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8)$(BR2_PACKAGE_FFMPEG),yy)
-FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3-Clause (libvpx, libyuv)
+FREESWITCH_LICENSE += , BSD-3-Clause (libvpx, libyuv)
 FREESWITCH_LICENSE_FILES += libs/libvpx/LICENSE libs/libyuv/LICENSE
 FREESWITCH_CONF_OPTS += --enable-libvpx --enable-libyuv
 FREESWITCH_DEPENDENCIES += host-yasm ffmpeg
diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk
index 13029bbe2f..efdcd21d9d 100644
--- a/package/gnutls/gnutls.mk
+++ b/package/gnutls/gnutls.mk
@@ -12,7 +12,7 @@ GNUTLS_LICENSE = LGPL-2.1+ (core library)
 GNUTLS_LICENSE_FILES = doc/COPYING.LESSER
 
 ifeq ($(BR2_PACKAGE_GNUTLS_OPENSSL),y)
-GNUTLS_LICENSE := $(GNUTLS_LICENSE), GPL-3.0+ (gnutls-openssl library)
+GNUTLS_LICENSE += , GPL-3.0+ (gnutls-openssl library)
 GNUTLS_LICENSE_FILES += doc/COPYING
 endif
 
diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
index f4a7a65871..59eb332e57 100644
--- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
+++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
@@ -724,18 +724,18 @@ endif
 
 # Add GPL license if GPL licensed plugins enabled.
 ifeq ($(GST1_PLUGINS_BAD_HAS_GPL_LICENSE),y)
-GST1_PLUGINS_BAD_LICENSE := $(GST1_PLUGINS_BAD_LICENSE), GPL-2.0+
+GST1_PLUGINS_BAD_LICENSE += , GPL-2.0+
 GST1_PLUGINS_BAD_LICENSE_FILES += COPYING
 endif
 
 # Add BSD license if BSD licensed plugins enabled.
 ifeq ($(GST1_PLUGINS_BAD_HAS_BSD2C_LICENSE),y)
-GST1_PLUGINS_BAD_LICENSE := $(GST1_PLUGINS_BAD_LICENSE), BSD-2-Clause
+GST1_PLUGINS_BAD_LICENSE += , BSD-2-Clause
 endif
 
 # Add Unknown license if Unknown licensed plugins enabled.
 ifeq ($(GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE),y)
-GST1_PLUGINS_BAD_LICENSE := $(GST1_PLUGINS_BAD_LICENSE), UNKNOWN
+GST1_PLUGINS_BAD_LICENSE += , UNKNOWN
 endif
 
 # Use the following command to extract license info for plugins.
diff --git a/package/iwd/iwd.mk b/package/iwd/iwd.mk
index 40ee06ba6f..fc8b83d1bb 100644
--- a/package/iwd/iwd.mk
+++ b/package/iwd/iwd.mk
@@ -32,7 +32,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_READLINE),y)
 # iwd client depends on readline (GPL-3.0+)
-IWD_LICENSE := $(IWD_LICENSE), GPL-3.0+ (client)
+IWD_LICENSE += , GPL-3.0+ (client)
 IWD_CONF_OPTS += --enable-client
 IWD_DEPENDENCIES += readline
 else
diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk
index a5bcf2f2d6..bec46684a4 100644
--- a/package/kmod/kmod.mk
+++ b/package/kmod/kmod.mk
@@ -50,7 +50,7 @@ endif
 ifeq ($(BR2_PACKAGE_KMOD_TOOLS),y)
 
 # add license info for kmod tools
-KMOD_LICENSE := $(KMOD_LICENSE), GPL-2.0+ (tools)
+KMOD_LICENSE += , GPL-2.0+ (tools)
 KMOD_LICENSE_FILES += COPYING
 
 # /sbin is really /usr/sbin with merged /usr, so adjust relative symlink
diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index 6e482e615c..028bf551bc 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -195,7 +195,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_KODI_NONFREE),y)
 KODI_CONF_OPTS += -DENABLE_NONFREE=ON
-KODI_LICENSE := $(KODI_LICENSE), unrar
+KODI_LICENSE += , unrar
 KODI_LICENSE_FILES += lib/UnrarXLib/license.txt
 else
 KODI_CONF_OPTS += -DENABLE_NONFREE=OFF
diff --git a/package/libidn2/libidn2.mk b/package/libidn2/libidn2.mk
index 10f179ebcc..bd6c559d04 100644
--- a/package/libidn2/libidn2.mk
+++ b/package/libidn2/libidn2.mk
@@ -24,7 +24,7 @@ define LIBIDN2_REMOVE_BINARY
 endef
 LIBIDN2_POST_INSTALL_TARGET_HOOKS += LIBIDN2_REMOVE_BINARY
 else
-LIBIDN2_LICENSE := $(LIBIDN2_LICENSE), GPL-3.0+ (program)
+LIBIDN2_LICENSE += , GPL-3.0+ (program)
 endif
 
 $(eval $(autotools-package))
diff --git a/package/libuci/libuci.mk b/package/libuci/libuci.mk
index 642238c2e8..55afd53c10 100644
--- a/package/libuci/libuci.mk
+++ b/package/libuci/libuci.mk
@@ -15,7 +15,7 @@ LIBUCI_DEPENDENCIES += lua
 LIBUCI_CONF_OPTS += -DBUILD_LUA=ON \
 	-DLUAPATH=/usr/lib/lua/5.1 \
 	-DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include
-LIBUCI_LICENSE := $(LIBUCI_LICENSE), GPL-2.0 (lua bindings)
+LIBUCI_LICENSE += , GPL-2.0 (lua bindings)
 else
 LIBUCI_CONF_OPTS += -DBUILD_LUA=OFF
 endif
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index e4aa76908a..15c9650391 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -101,7 +101,7 @@ QT5BASE_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3 (docs
 QT5BASE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5BASE_LICENSE := $(QT5BASE_LICENSE), BSD-3-Clause (examples)
+QT5BASE_LICENSE += , BSD-3-Clause (examples)
 QT5BASE_LICENSE_FILES += header.BSD
 endif
 
@@ -153,7 +153,7 @@ QT5BASE_DEPENDENCIES += harfbuzz
 else
 # qt harfbuzz otherwise (using QAtomic instead)
 QT5BASE_CONFIGURE_OPTS += -qt-harfbuzz
-QT5BASE_LICENSE := $(QT5BASE_LICENSE), MIT (harfbuzz)
+QT5BASE_LICENSE += , MIT (harfbuzz)
 QT5BASE_LICENSE_FILES += src/3rdparty/harfbuzz-ng/COPYING
 endif
 else
diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk
index 24dbc2cba0..8e4e4669b9 100644
--- a/package/qt5/qt5connectivity/qt5connectivity.mk
+++ b/package/qt5/qt5connectivity/qt5connectivity.mk
@@ -18,7 +18,7 @@ QT5CONNECTIVITY_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-
 QT5CONNECTIVITY_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5CONNECTIVITY_LICENSE := $(QT5CONNECTIVITY_LICENSE), BSD-3-Clause (examples)
+QT5CONNECTIVITY_LICENSE += , BSD-3-Clause (examples)
 endif
 
 QT5CONNECTIVITY_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5DECLARATIVE),qt5declarative)
diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk
index 2a4cf72ec7..ebd99e4cb7 100644
--- a/package/qt5/qt5enginio/qt5enginio.mk
+++ b/package/qt5/qt5enginio/qt5enginio.mk
@@ -15,7 +15,7 @@ QT5ENGINIO_INSTALL_STAGING = YES
 QT5ENGINIO_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3 (docs)
 QT5ENGINIO_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5ENGINIO_LICENSE := $(QT5ENGINIO_LICENSE), BSD-3-Clause (examples)
+QT5ENGINIO_LICENSE += , BSD-3-Clause (examples)
 endif
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk
index b8a1c4ff75..611b41a8c7 100644
--- a/package/qt5/qt5multimedia/qt5multimedia.mk
+++ b/package/qt5/qt5multimedia/qt5multimedia.mk
@@ -74,7 +74,7 @@ endef
 endif
 
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5MULTIMEDIA_LICENSE := $(QT5MULTIMEDIA_LICENSE), LGPL-2.1+ (examples/multimedia/spectrum/3rdparty/fftreal)
+QT5MULTIMEDIA_LICENSE += , LGPL-2.1+ (examples/multimedia/spectrum/3rdparty/fftreal)
 QT5MULTIMEDIA_LICENSE_FILES += examples/multimedia/spectrum/3rdparty/fftreal/license.txt
 define QT5MULTIMEDIA_INSTALL_TARGET_EXAMPLES
 	cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/multimedia* $(TARGET_DIR)/usr/lib/qt/examples/
diff --git a/package/qt5/qt5scxml/qt5scxml.mk b/package/qt5/qt5scxml/qt5scxml.mk
index b54ef0e43a..c0776314d5 100644
--- a/package/qt5/qt5scxml/qt5scxml.mk
+++ b/package/qt5/qt5scxml/qt5scxml.mk
@@ -13,7 +13,7 @@ QT5SCXML_INSTALL_STAGING = YES
 QT5SCXML_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0 with exception(tools), GFDL-1.3 (docs)
 QT5SCXML_LICENSE_FILES = LICENSE.GPL3-EXCEPT LICENSE.LGPL3 LICENSE.FDL
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5SCXML_LICENSE := $(QT5SCXML_LICENSE), BSD-3-Clause (examples)
+QT5SCXML_LICENSE += , BSD-3-Clause (examples)
 endif
 
 define QT5SCXML_CONFIGURE_CMDS
diff --git a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
index 814b454010..59ee30c2d2 100644
--- a/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
+++ b/package/qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk
@@ -25,7 +25,7 @@ ifneq ($(strip $(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+="$(foreach lang,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS),lang-$(lang))"
 
 ifneq ($(filter ja_JP all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
-QT5VIRTUALKEYBOARD_LICENSE := $(QT5VIRTUALKEYBOARD_LICENSE), Apache-2.0 (openwnn)
+QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (openwnn)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/openwnn/NOTICE
 else
@@ -35,7 +35,7 @@ endif
 
 ifneq ($(filter zh_CN all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
-QT5VIRTUALKEYBOARD_LICENSE := $(QT5VIRTUALKEYBOARD_LICENSE), Apache-2.0 (pinyin)
+QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (pinyin)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/pinyin/NOTICE
 else
@@ -45,7 +45,7 @@ endif
 
 ifneq ($(filter zh_TW all,$(QT5VIRTUALKEYBOARD_LANGUAGE_LAYOUTS)),)
 QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
-QT5VIRTUALKEYBOARD_LICENSE := $(QT5VIRTUALKEYBOARD_LICENSE), Apache-2.0 (tcime), BSD-3-Clause (tcime)
+QT5VIRTUALKEYBOARD_LICENSE += , Apache-2.0 (tcime), BSD-3-Clause (tcime)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/tcime/COPYING
 else
@@ -57,7 +57,7 @@ endif
 ifeq ($(BR2_PACKAGE_QT5VIRTUALKEYBOARD_HANDWRITING),y)
 QT5VIRTUALKEYBOARD_3RDPARTY_PARTS = YES
 QT5VIRTUALKEYBOARD_QMAKEFLAGS += CONFIG+=handwriting
-QT5VIRTUALKEYBOARD_LICENSE := $(QT5VIRTUALKEYBOARD_LICENSE), MIT (lipi-toolkit)
+QT5VIRTUALKEYBOARD_LICENSE += , MIT (lipi-toolkit)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_5_6),y)
 QT5VIRTUALKEYBOARD_LICENSE_FILES += src/virtualkeyboard/3rdparty/lipi-toolkit/license.txt
 else
diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk
index d136041980..22523036e7 100644
--- a/package/qt5/qt5webchannel/qt5webchannel.mk
+++ b/package/qt5/qt5webchannel/qt5webchannel.mk
@@ -18,7 +18,7 @@ QT5WEBCHANNEL_LICENSE = GPL-2.0 or GPL-3.0 or LGPL-2.1 with exception or LGPL-3.
 QT5WEBCHANNEL_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5WEBCHANNEL_LICENSE := $(QT5WEBCHANNEL_LICENSE), BSD-3-Clause (examples)
+QT5WEBCHANNEL_LICENSE += , BSD-3-Clause (examples)
 endif
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk
index d026a44ff1..6e734a3bf3 100644
--- a/package/qt5/qt5websockets/qt5websockets.mk
+++ b/package/qt5/qt5websockets/qt5websockets.mk
@@ -18,7 +18,7 @@ QT5WEBSOCKETS_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0
 QT5WEBSOCKETS_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3
 endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5WEBSOCKETS_LICENSE := $(QT5WEBSOCKETS_LICENSE), BSD-3-Clause (examples)
+QT5WEBSOCKETS_LICENSE += , BSD-3-Clause (examples)
 endif
 
 ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y)
diff --git a/package/qt5/qt5webview/qt5webview.mk b/package/qt5/qt5webview/qt5webview.mk
index d9b913d68e..0a80dba612 100644
--- a/package/qt5/qt5webview/qt5webview.mk
+++ b/package/qt5/qt5webview/qt5webview.mk
@@ -13,7 +13,7 @@ QT5WEBVIEW_LICENSE = GPL-2.0+ or LGPL-3.0, GPL-3.0, GFDL-1.3 (docs)
 QT5WEBVIEW_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL
 
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5WEBVIEW_LICENSE := $(QT5WEBVIEW_LICENSE), BSD-3-Clause (examples)
+QT5WEBVIEW_LICENSE += , BSD-3-Clause (examples)
 endif
 
 define QT5WEBVIEW_CONFIGURE_CMDS
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
index 8be708844b..6ed247fd59 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
@@ -18,7 +18,7 @@ QT5XMLPATTERNS_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.
 QT5XMLPATTERNS_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
-QT5XMLPATTERNS_LICENSE := $(QT5XMLPATTERNS_LICENSE), BSD-3-Clause (examples)
+QT5XMLPATTERNS_LICENSE += , BSD-3-Clause (examples)
 endif
 
 define QT5XMLPATTERNS_CONFIGURE_CMDS
diff --git a/package/sg3_utils/sg3_utils.mk b/package/sg3_utils/sg3_utils.mk
index 79521fd06e..7070d6f83d 100644
--- a/package/sg3_utils/sg3_utils.mk
+++ b/package/sg3_utils/sg3_utils.mk
@@ -10,7 +10,7 @@ SG3_UTILS_SITE = http://sg.danny.cz/sg/p
 SG3_UTILS_LICENSE = BSD-3-Clause (library)
 # Some utils progs are GPL-2.0+ licensed while others are BSD-3-Clause
 ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y)
-SG3_UTILS_LICENSE := $(SG3_UTILS_LICENSE), GPL-2.0+ (programs), BSD-3-Clause (programs)
+SG3_UTILS_LICENSE += , GPL-2.0+ (programs), BSD-3-Clause (programs)
 endif
 SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE
 
diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk
index 229a9a5618..8848670ea9 100644
--- a/package/usbredir/usbredir.mk
+++ b/package/usbredir/usbredir.mk
@@ -14,7 +14,7 @@ USBREDIR_DEPENDENCIES = host-pkgconf libusb
 
 ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y)
 
-USBREDIR_LICENSE := $(USBREDIR_LICENSE), GPL-2.0+ (program)
+USBREDIR_LICENSE += , GPL-2.0+ (program)
 USBREDIR_LICENSE_FILES += COPYING
 
 else # BR2_PACKAGE_USBREDIR_SERVER != y
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 1/9] core/legal-info: don't require overriding _LICENSE Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-27  9:44   ` Arnout Vandecappelle
  2019-10-26  8:45 ` [Buildroot] [PATCH 4/9] package/ligpgme: don't use :=, use += and subst Yann E. MORIN
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

There is no longer any reason to assign to LICENSE using an
immediate assignment. There was even no reason to use it
either in the first assignment.

Drop it.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 2 +-
 package/libidn2/libidn2.mk                              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
index 59eb332e57..856db88e49 100644
--- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
+++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
@@ -11,7 +11,7 @@ GST1_PLUGINS_BAD_INSTALL_STAGING = YES
 # Additional plugin licenses will be appended to GST1_PLUGINS_BAD_LICENSE and
 # GST1_PLUGINS_BAD_LICENSE_FILES if enabled.
 GST1_PLUGINS_BAD_LICENSE_FILES = COPYING.LIB
-GST1_PLUGINS_BAD_LICENSE := LGPL-2.0+, LGPL-2.1+
+GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+
 
 GST1_PLUGINS_BAD_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
 
diff --git a/package/libidn2/libidn2.mk b/package/libidn2/libidn2.mk
index bd6c559d04..5e05634942 100644
--- a/package/libidn2/libidn2.mk
+++ b/package/libidn2/libidn2.mk
@@ -6,7 +6,7 @@
 
 LIBIDN2_VERSION = 2.2.0
 LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
-LIBIDN2_LICENSE := GPL-2.0+ or LGPL-3.0+ (library)
+LIBIDN2_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
 LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3 COPYING.unicode
 LIBIDN2_DEPENDENCIES = \
 	host-pkgconf \
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 4/9] package/ligpgme: don't use :=, use += and subst
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2019-10-26  8:45 ` [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 5/9] package/zmqpp: don't override variable Yann E. MORIN
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

This makes it more in-line with how we handle such case in the
rest of Buildroot.

Also, move the variable assignment before its use. Even though
in a makefile that does not matter, it makes it cleaner, more
logical, and easier to follow (for us petty humans).

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/libgpgme/libgpgme.mk | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/libgpgme/libgpgme.mk b/package/libgpgme/libgpgme.mk
index 1a045862dd..1951cc6675 100644
--- a/package/libgpgme/libgpgme.mk
+++ b/package/libgpgme/libgpgme.mk
@@ -11,9 +11,14 @@ LIBGPGME_LICENSE = LGPL-2.1+
 LIBGPGME_LICENSE_FILES = COPYING.LESSER
 LIBGPGME_INSTALL_STAGING = YES
 LIBGPGME_DEPENDENCIES = libassuan libgpg-error
-LIBGPGME_LANGUAGE_BINDINGS = cl
 LIBGPGME_CONFIG_SCRIPTS = gpgme-config
 
+LIBGPGME_LANGUAGE_BINDINGS = cl
+# C++ bindings require a C++11 capable gcc, and -Wsuggest-override support
+ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),yy)
+LIBGPGME_LANGUAGE_BINDINGS += cpp
+endif
+
 LIBGPGME_CONF_OPTS = \
 	--with-gpg-error-prefix=$(STAGING_DIR)/usr \
 	--with-libassuan-prefix=$(STAGING_DIR)/usr \
@@ -21,12 +26,7 @@ LIBGPGME_CONF_OPTS = \
 	--disable-gpgconf-test \
 	--disable-g13-test \
 	--disable-gpg-test \
-	--enable-languages=$(LIBGPGME_LANGUAGE_BINDINGS)
-
-# C++ bindings require a C++11 capable gcc, and -Wsuggest-override support
-ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),yy)
-LIBGPGME_LANGUAGE_BINDINGS := $(LIBGPGME_LANGUAGE_BINDINGS),cpp
-endif
+	--enable-languages=$(subst $(space),$(comma),$(LIBGPGME_LANGUAGE_BINDINGS))
 
 # Handle argp-standalone or it errors out during build
 ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment)
@ 2019-10-26  8:45 Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 1/9] core/legal-info: don't require overriding _LICENSE Yann E. MORIN
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Hello All!

This let us drop the last case where we had to use immediate assignment
in thr packages .mk files., and thus makes the rule much simpler: we
never use immediate assignment.


Regards,
Yann E. MORIN.


The following changes since commit c0ffd16e40f15938f4a440a1048fc3d7fba2f7c4

  package/kvm-unit-tests: fix build on Arch Linux x86_64 (2019-10-26 10:31:20 +0200)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 9c2c26f0d6e2967ef96cf5602e193a397cd4cc6a

  utils/check-package: report := that apends to variables (2019-10-26 10:40:20 +0200)


----------------------------------------------------------------
Yann E. MORIN (9):
      core/legal-info: don't require overriding _LICENSE
      package: do not override LICENSE, but append to it
      package: get rid of remnants of using := in LICENSE
      package/ligpgme: don't use :=, use += and subst
      package/zmqpp: don't override variable
      package/gcc: don't override a variable
      fs: don't use := when not needed
      arc/riscv: get rid of immediate-assignment
      utils/check-package: report := that apends to variables

 arch/arch.mk.riscv                                 | 22 +++++++++++-----------
 docs/manual/adding-packages-generic.txt            | 16 ++++++++++------
 fs/btrfs/btrfs.mk                                  |  2 +-
 fs/ext2/ext2.mk                                    |  2 +-
 fs/f2fs/f2fs.mk                                    |  2 +-
 fs/jffs2/jffs2.mk                                  |  4 ++--
 fs/tar/tar.mk                                      |  2 +-
 fs/ubi/ubi.mk                                      |  2 +-
 package/dtc/dtc.mk                                 |  2 +-
 package/elfutils/elfutils.mk                       |  2 +-
 package/freeswitch/freeswitch.mk                   |  6 +++---
 package/gcc/gcc-final/gcc-final.mk                 |  8 +++-----
 package/gnutls/gnutls.mk                           |  2 +-
 .../gst1-plugins-bad/gst1-plugins-bad.mk           |  8 ++++----
 package/iwd/iwd.mk                                 |  2 +-
 package/kmod/kmod.mk                               |  2 +-
 package/kodi/kodi.mk                               |  2 +-
 package/libgpgme/libgpgme.mk                       | 14 +++++++-------
 package/libidn2/libidn2.mk                         |  4 ++--
 package/libuci/libuci.mk                           |  2 +-
 package/pkg-generic.mk                             |  2 +-
 package/qt5/qt5base/qt5base.mk                     |  4 ++--
 package/qt5/qt5connectivity/qt5connectivity.mk     |  2 +-
 package/qt5/qt5enginio/qt5enginio.mk               |  2 +-
 package/qt5/qt5multimedia/qt5multimedia.mk         |  2 +-
 package/qt5/qt5scxml/qt5scxml.mk                   |  2 +-
 .../qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk   |  8 ++++----
 package/qt5/qt5webchannel/qt5webchannel.mk         |  2 +-
 package/qt5/qt5websockets/qt5websockets.mk         |  2 +-
 package/qt5/qt5webview/qt5webview.mk               |  2 +-
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk       |  2 +-
 package/sg3_utils/sg3_utils.mk                     |  2 +-
 package/usbredir/usbredir.mk                       |  2 +-
 package/zmqpp/zmqpp.mk                             |  9 ++++-----
 utils/checkpackagelib/lib_mk.py                    |  4 +++-
 35 files changed, 78 insertions(+), 75 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 5/9] package/zmqpp: don't override variable
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2019-10-26  8:45 ` [Buildroot] [PATCH 4/9] package/ligpgme: don't use :=, use += and subst Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-26  8:45 ` [Buildroot] [PATCH 6/9] package/gcc: don't override a variable Yann E. MORIN
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Instead of reseting the variable when we can't set it, just set it when
we can: we just have to negate the condition.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/zmqpp/zmqpp.mk | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk
index ea6b50e826..383be90bc6 100644
--- a/package/zmqpp/zmqpp.mk
+++ b/package/zmqpp/zmqpp.mk
@@ -12,15 +12,14 @@ ZMQPP_LICENSE = MPL-2.0
 ZMQPP_LICENSE_FILES = LICENSE
 ZMQPP_MAKE_OPTS = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr
 ZMQPP_LDFLAGS = $(TARGET_LDFLAGS) -lpthread
-ZMQPP_CONFIG = $(if $(BR2_ENABLE_DEBUG),debug,release)
 
 # gcc bug internal compiler error: in merge_overlapping_regs, at
 # regrename.c:304. This bug is fixed since gcc 6.
 # By setting CONFIG to empty, all optimizations such as -funroll-loops
-# -ffast-math -finline-functions -fomit-frame-pointer are disabled
-ifeq ($(BR2_or1k):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:)
-# check-package OverriddenVariable
-ZMQPP_CONFIG =
+# -ffast-math -finline-functions -fomit-frame-pointer are disabled,
+# So, only set CONFIG for the non-affected cases.
+ifneq ($(BR2_or1k):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:)
+ZMQPP_CONFIG = $(if $(BR2_ENABLE_DEBUG),debug,release)
 endif
 
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 6/9] package/gcc: don't override a variable
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2019-10-26  8:45 ` [Buildroot] [PATCH 5/9] package/zmqpp: don't override variable Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-27  9:58   ` Arnout Vandecappelle
  2019-10-26  8:45 ` [Buildroot] [PATCH 7/9] fs: don't use := when not needed Yann E. MORIN
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/gcc/gcc-final/gcc-final.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 79c88a5d60..30fb87856c 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -64,18 +64,16 @@ HOST_GCC_FINAL_CONF_OPTS = \
 	--enable-languages=$(GCC_FINAL_CROSS_LANGUAGES) \
 	--with-build-time-tools=$(HOST_DIR)/$(GNU_TARGET_NAME)/bin
 
-HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib*
 # The kernel wants to use the -m4-nofpu option to make sure that it
 # doesn't use floating point operations.
 ifeq ($(BR2_sh4)$(BR2_sh4eb),y)
 HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4,m4-nofpu"
-# check-package OverriddenVariable
 HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib/!m4*
-endif
-ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y)
+else ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y)
 HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4a,m4a-nofpu"
-# check-package OverriddenVariable
 HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib/!m4*
+else
+HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib*
 endif
 
 ifeq ($(BR2_GCC_SUPPORTS_LIBCILKRTS),y)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 7/9] fs: don't use := when not needed
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2019-10-26  8:45 ` [Buildroot] [PATCH 6/9] package/gcc: don't override a variable Yann E. MORIN
@ 2019-10-26  8:45 ` Yann E. MORIN
  2019-10-27  9:45   ` Arnout Vandecappelle
  2019-10-26  8:46 ` [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment Yann E. MORIN
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 fs/btrfs/btrfs.mk | 2 +-
 fs/ext2/ext2.mk   | 2 +-
 fs/f2fs/f2fs.mk   | 2 +-
 fs/jffs2/jffs2.mk | 4 ++--
 fs/tar/tar.mk     | 2 +-
 fs/ubi/ubi.mk     | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/btrfs/btrfs.mk b/fs/btrfs/btrfs.mk
index 388516389b..70e3ead97c 100644
--- a/fs/btrfs/btrfs.mk
+++ b/fs/btrfs/btrfs.mk
@@ -14,7 +14,7 @@ BTRFS_SIZE_SECTOR = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_SIZE_SECTOR))
 BTRFS_FEATURES = $(call qstrip,$(BR2_TARGET_ROOTFS_BTRFS_FEATURES))
 # qstrip results in stripping consecutive spaces into a single one. So the
 # variable is not qstrip-ed to preserve the integrity of the string value.
-BTRFS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_BTRFS_LABEL))
+BTRFS_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_BTRFS_LABEL))
 # ")
 
 BTRFS_OPTS = \
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 6bb4b1c7f8..74c99bd7b1 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -13,7 +13,7 @@ EXT2_MKFS_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS))
 
 # qstrip results in stripping consecutive spaces into a single one. So the
 # variable is not qstrip-ed to preserve the integrity of the string value.
-EXT2_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
+EXT2_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_EXT2_LABEL))
 #" Syntax highlighting... :-/ )
 
 EXT2_OPTS = \
diff --git a/fs/f2fs/f2fs.mk b/fs/f2fs/f2fs.mk
index f35bb60ad0..21a2879c17 100644
--- a/fs/f2fs/f2fs.mk
+++ b/fs/f2fs/f2fs.mk
@@ -11,7 +11,7 @@ endif
 
 # qstrip results in stripping consecutive spaces into a single one. So the
 # variable is not qstrip-ed to preserve the integrity of the string value.
-F2FS_LABEL := $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
+F2FS_LABEL = $(subst ",,$(BR2_TARGET_ROOTFS_F2FS_LABEL))
 # ")
 F2FS_COLD_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_COLD_FILES))
 F2FS_HOT_FILES = $(call qstrip,$(BR2_TARGET_ROOTFS_F2FS_HOT_FILES))
diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk
index 740ab3e03d..2adbc2320e 100644
--- a/fs/jffs2/jffs2.mk
+++ b/fs/jffs2/jffs2.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
-SUMTOOL_OPTS := $(JFFS2_OPTS)
+JFFS2_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
+SUMTOOL_OPTS = -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE)
 
 ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y)
 ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0)
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 393d01bfe8..841af14706 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
+TAR_OPTS = $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS))
 
 ROOTFS_TAR_DEPENDENCIES = $(BR2_TAR_HOST_DEPENDENCY)
 
diff --git a/fs/ubi/ubi.mk b/fs/ubi/ubi.mk
index 9874e73ff6..d848f8b23a 100644
--- a/fs/ubi/ubi.mk
+++ b/fs/ubi/ubi.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
+UBI_UBINIZE_OPTS = -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
 UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE)
 ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0)
 UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE)
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (6 preceding siblings ...)
  2019-10-26  8:45 ` [Buildroot] [PATCH 7/9] fs: don't use := when not needed Yann E. MORIN
@ 2019-10-26  8:46 ` Yann E. MORIN
  2019-10-27  9:56   ` Arnout Vandecappelle
  2019-10-26  8:46 ` [Buildroot] [PATCH 9/9] utils/check-package: report := that apends to variables Yann E. MORIN
  2019-10-27  9:37 ` [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Arnout Vandecappelle
  9 siblings, 1 reply; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:46 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 arch/arch.mk.riscv | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv
index f3bf2b3467..da2188706c 100644
--- a/arch/arch.mk.riscv
+++ b/arch/arch.mk.riscv
@@ -5,26 +5,26 @@
 
 ifeq ($(BR2_riscv),y)
 
-ifeq ($(BR2_RISCV_64),y)
-GCC_TARGET_ARCH := rv64i
-else
-GCC_TARGET_ARCH := rv32i
-endif
-
 ifeq ($(BR2_RISCV_ISA_RVM),y)
-GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m
+GCC_TARGET_ARCH_SUFFIX += m
 endif
 ifeq ($(BR2_RISCV_ISA_RVA),y)
-GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a
+GCC_TARGET_ARCH_SUFFIX += a
 endif
 ifeq ($(BR2_RISCV_ISA_RVF),y)
-GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f
+GCC_TARGET_ARCH_SUFFIX += f
 endif
 ifeq ($(BR2_RISCV_ISA_RVD),y)
-GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d
+GCC_TARGET_ARCH_SUFFIX += d
 endif
 ifeq ($(BR2_RISCV_ISA_RVC),y)
-GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c
+GCC_TARGET_ARCH_SUFFIX += c
+endif
+
+ifeq ($(BR2_RISCV_64),y)
+GCC_TARGET_ARCH = rv64i$(subst $(space),,$(GCC_TARGET_ARCH_SUFFIX))
+else
+GCC_TARGET_ARCH = rv32i$(subst $(space),,$(GCC_TARGET_ARCH_SUFFIX))
 endif
 
 endif
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 9/9] utils/check-package: report := that apends to variables
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (7 preceding siblings ...)
  2019-10-26  8:46 ` [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment Yann E. MORIN
@ 2019-10-26  8:46 ` Yann E. MORIN
  2019-10-27  9:37 ` [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Arnout Vandecappelle
  9 siblings, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2019-10-26  8:46 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 utils/checkpackagelib/lib_mk.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/utils/checkpackagelib/lib_mk.py b/utils/checkpackagelib/lib_mk.py
index dd04ffd58f..b805cd9925 100644
--- a/utils/checkpackagelib/lib_mk.py
+++ b/utils/checkpackagelib/lib_mk.py
@@ -126,7 +126,9 @@ class OverriddenVariable(_CheckFunction):
                 self.conditionally_set.append(variable)
                 return
             if self.CONCATENATING.search(text):
-                return
+                return ["{}:{}: immediate assignment to append to variable {}"
+                        .format(self.filename, lineno, variable),
+                        text]
             if self.USUALLY_OVERRIDDEN.search(text):
                 return
             if assignment in self.OVERRIDING_ASSIGNMENTS:
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment)
  2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
                   ` (8 preceding siblings ...)
  2019-10-26  8:46 ` [Buildroot] [PATCH 9/9] utils/check-package: report := that apends to variables Yann E. MORIN
@ 2019-10-27  9:37 ` Arnout Vandecappelle
  9 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:37 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:45, Yann E. MORIN wrote:
> Hello All!
> 
> This let us drop the last case where we had to use immediate assignment
> in thr packages .mk files., and thus makes the rule much simpler: we
> never use immediate assignment.

 Series, applied to master, with a few exceptions, see individual replies.

 Thanks,

 Regards,
 Arnout

> 
> 
> Regards,
> Yann E. MORIN.
> 
> 
> The following changes since commit c0ffd16e40f15938f4a440a1048fc3d7fba2f7c4
> 
>   package/kvm-unit-tests: fix build on Arch Linux x86_64 (2019-10-26 10:31:20 +0200)
> 
> 
> are available in the git repository at:
> 
>   git://git.buildroot.org/~ymorin/git/buildroot.git
> 
> for you to fetch changes up to 9c2c26f0d6e2967ef96cf5602e193a397cd4cc6a
> 
>   utils/check-package: report := that apends to variables (2019-10-26 10:40:20 +0200)
> 
> 
> ----------------------------------------------------------------
> Yann E. MORIN (9):
>       core/legal-info: don't require overriding _LICENSE
>       package: do not override LICENSE, but append to it
>       package: get rid of remnants of using := in LICENSE
>       package/ligpgme: don't use :=, use += and subst
>       package/zmqpp: don't override variable
>       package/gcc: don't override a variable
>       fs: don't use := when not needed
>       arc/riscv: get rid of immediate-assignment
>       utils/check-package: report := that apends to variables
> 
>  arch/arch.mk.riscv                                 | 22 +++++++++++-----------
>  docs/manual/adding-packages-generic.txt            | 16 ++++++++++------
>  fs/btrfs/btrfs.mk                                  |  2 +-
>  fs/ext2/ext2.mk                                    |  2 +-
>  fs/f2fs/f2fs.mk                                    |  2 +-
>  fs/jffs2/jffs2.mk                                  |  4 ++--
>  fs/tar/tar.mk                                      |  2 +-
>  fs/ubi/ubi.mk                                      |  2 +-
>  package/dtc/dtc.mk                                 |  2 +-
>  package/elfutils/elfutils.mk                       |  2 +-
>  package/freeswitch/freeswitch.mk                   |  6 +++---
>  package/gcc/gcc-final/gcc-final.mk                 |  8 +++-----
>  package/gnutls/gnutls.mk                           |  2 +-
>  .../gst1-plugins-bad/gst1-plugins-bad.mk           |  8 ++++----
>  package/iwd/iwd.mk                                 |  2 +-
>  package/kmod/kmod.mk                               |  2 +-
>  package/kodi/kodi.mk                               |  2 +-
>  package/libgpgme/libgpgme.mk                       | 14 +++++++-------
>  package/libidn2/libidn2.mk                         |  4 ++--
>  package/libuci/libuci.mk                           |  2 +-
>  package/pkg-generic.mk                             |  2 +-
>  package/qt5/qt5base/qt5base.mk                     |  4 ++--
>  package/qt5/qt5connectivity/qt5connectivity.mk     |  2 +-
>  package/qt5/qt5enginio/qt5enginio.mk               |  2 +-
>  package/qt5/qt5multimedia/qt5multimedia.mk         |  2 +-
>  package/qt5/qt5scxml/qt5scxml.mk                   |  2 +-
>  .../qt5/qt5virtualkeyboard/qt5virtualkeyboard.mk   |  8 ++++----
>  package/qt5/qt5webchannel/qt5webchannel.mk         |  2 +-
>  package/qt5/qt5websockets/qt5websockets.mk         |  2 +-
>  package/qt5/qt5webview/qt5webview.mk               |  2 +-
>  package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk       |  2 +-
>  package/sg3_utils/sg3_utils.mk                     |  2 +-
>  package/usbredir/usbredir.mk                       |  2 +-
>  package/zmqpp/zmqpp.mk                             |  9 ++++-----
>  utils/checkpackagelib/lib_mk.py                    |  4 +++-
>  35 files changed, 78 insertions(+), 75 deletions(-)
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it
  2019-10-26  8:45 ` [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it Yann E. MORIN
@ 2019-10-27  9:40   ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:40 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:45, Yann E. MORIN wrote:
> Now that the infra takes care of removing extraneous spaces before
> commas, we can safely append to LICENSE variables.
> 
> This removes the only case where we had to use immediate assignment
> to append to a variable.
> 
> Mechanical change, with:
> 
>     $ sed -r -i -e 's/\<([^[:space:]]+_LICENSE) := \$\(\1\),/\1 += ,/' \
>         $(git grep -l -E '\<([^[:space:]]+_LICENSE) := \$\(\1\),')

 Great that you put the script in the commit message!

 Normally, we want a single patch per package, but in case of a mechanical
change I agree it's better to do all together.

 Regards,
 Arnout

> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE
  2019-10-26  8:45 ` [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE Yann E. MORIN
@ 2019-10-27  9:44   ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:44 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:45, Yann E. MORIN wrote:
> There is no longer any reason to assign to LICENSE using an
> immediate assignment. There was even no reason to use it
> either in the first assignment.
> 
> Drop it.
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>

 We want one patch per pacakge, so I split this in two.

 Regards,
 Arnout

> ---
>  package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk | 2 +-
>  package/libidn2/libidn2.mk                              | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
> index 59eb332e57..856db88e49 100644
> --- a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
> +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
> @@ -11,7 +11,7 @@ GST1_PLUGINS_BAD_INSTALL_STAGING = YES
>  # Additional plugin licenses will be appended to GST1_PLUGINS_BAD_LICENSE and
>  # GST1_PLUGINS_BAD_LICENSE_FILES if enabled.
>  GST1_PLUGINS_BAD_LICENSE_FILES = COPYING.LIB
> -GST1_PLUGINS_BAD_LICENSE := LGPL-2.0+, LGPL-2.1+
> +GST1_PLUGINS_BAD_LICENSE = LGPL-2.0+, LGPL-2.1+
>  
>  GST1_PLUGINS_BAD_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
>  
> diff --git a/package/libidn2/libidn2.mk b/package/libidn2/libidn2.mk
> index bd6c559d04..5e05634942 100644
> --- a/package/libidn2/libidn2.mk
> +++ b/package/libidn2/libidn2.mk
> @@ -6,7 +6,7 @@
>  
>  LIBIDN2_VERSION = 2.2.0
>  LIBIDN2_SITE = $(BR2_GNU_MIRROR)/libidn
> -LIBIDN2_LICENSE := GPL-2.0+ or LGPL-3.0+ (library)
> +LIBIDN2_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
>  LIBIDN2_LICENSE_FILES = COPYING COPYINGv2 COPYING.LESSERv3 COPYING.unicode
>  LIBIDN2_DEPENDENCIES = \
>  	host-pkgconf \
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 7/9] fs: don't use := when not needed
  2019-10-26  8:45 ` [Buildroot] [PATCH 7/9] fs: don't use := when not needed Yann E. MORIN
@ 2019-10-27  9:45   ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:45 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:45, Yann E. MORIN wrote:
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  fs/btrfs/btrfs.mk | 2 +-
>  fs/ext2/ext2.mk   | 2 +-
>  fs/f2fs/f2fs.mk   | 2 +-
>  fs/jffs2/jffs2.mk | 4 ++--
>  fs/tar/tar.mk     | 2 +-
>  fs/ubi/ubi.mk     | 2 +-

 We normally want one patch per package :-)

 I didn't bother splitting those though.

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment
  2019-10-26  8:46 ` [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment Yann E. MORIN
@ 2019-10-27  9:56   ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:56 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:46, Yann E. MORIN wrote:
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  arch/arch.mk.riscv | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv
> index f3bf2b3467..da2188706c 100644
> --- a/arch/arch.mk.riscv
> +++ b/arch/arch.mk.riscv
> @@ -5,26 +5,26 @@
>  
>  ifeq ($(BR2_riscv),y)
>  
> -ifeq ($(BR2_RISCV_64),y)
> -GCC_TARGET_ARCH := rv64i
> -else
> -GCC_TARGET_ARCH := rv32i
> -endif
> -
>  ifeq ($(BR2_RISCV_ISA_RVM),y)
> -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m
> +GCC_TARGET_ARCH_SUFFIX += m
>  endif
>  ifeq ($(BR2_RISCV_ISA_RVA),y)
> -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a
> +GCC_TARGET_ARCH_SUFFIX += a
>  endif
>  ifeq ($(BR2_RISCV_ISA_RVF),y)
> -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f
> +GCC_TARGET_ARCH_SUFFIX += f
>  endif
>  ifeq ($(BR2_RISCV_ISA_RVD),y)
> -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d
> +GCC_TARGET_ARCH_SUFFIX += d
>  endif
>  ifeq ($(BR2_RISCV_ISA_RVC),y)
> -GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c
> +GCC_TARGET_ARCH_SUFFIX += c
> +endif
> +
> +ifeq ($(BR2_RISCV_64),y)
> +GCC_TARGET_ARCH = rv64i$(subst $(space),,$(GCC_TARGET_ARCH_SUFFIX))
> +else
> +GCC_TARGET_ARCH = rv32i$(subst $(space),,$(GCC_TARGET_ARCH_SUFFIX))
>  endif

 I think we're loosing a bit of symmetry with this approach. How about this?

GCC_TARGET_ARCH_COMPONENTS = \
	rv \
	$(if $(BR2_RISCV_64),64,32) \
	i \
	$(if $(BR2_RISCV_ISA_RVM),m) \
	...

?

Of course, we could just immediately do

GCC_TARGET_ARCH_COMPONENTS = rv$(if $(BR2_RISCV_64),64,32)i$(if
$(BR2_RISCV_ISA_RVM),m)..

but that's majorly ugly...


 Anyway, this is a bit of bikeshedding, so I haven't marked as Changes
Requested, but I didn't apply yet either.

 BTW, note that check-package does NOT fail on the concatenations that are still
left in this file, because it's inside a conditional. So maybe that should be
fixed as well.


 Regards,
 Arnout

>  
>  endif
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Buildroot] [PATCH 6/9] package/gcc: don't override a variable
  2019-10-26  8:45 ` [Buildroot] [PATCH 6/9] package/gcc: don't override a variable Yann E. MORIN
@ 2019-10-27  9:58   ` Arnout Vandecappelle
  0 siblings, 0 replies; 16+ messages in thread
From: Arnout Vandecappelle @ 2019-10-27  9:58 UTC (permalink / raw)
  To: buildroot



On 26/10/2019 10:45, Yann E. MORIN wrote:
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> ---
>  package/gcc/gcc-final/gcc-final.mk | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
> index 79c88a5d60..30fb87856c 100644
> --- a/package/gcc/gcc-final/gcc-final.mk
> +++ b/package/gcc/gcc-final/gcc-final.mk
> @@ -64,18 +64,16 @@ HOST_GCC_FINAL_CONF_OPTS = \
>  	--enable-languages=$(GCC_FINAL_CROSS_LANGUAGES) \
>  	--with-build-time-tools=$(HOST_DIR)/$(GNU_TARGET_NAME)/bin
>  
> -HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib*
>  # The kernel wants to use the -m4-nofpu option to make sure that it
>  # doesn't use floating point operations.
>  ifeq ($(BR2_sh4)$(BR2_sh4eb),y)
>  HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4,m4-nofpu"
> -# check-package OverriddenVariable
>  HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib/!m4*
> -endif
> -ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y)
> +else ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y)
>  HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4a,m4a-nofpu"
> -# check-package OverriddenVariable

 Note that this was the last user of OverriddenVariable, so maybe we should
remove support for it?

 Regards,
 Arnout

>  HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib/!m4*
> +else
> +HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/$(GNU_TARGET_NAME)/lib*
>  endif
>  
>  ifeq ($(BR2_GCC_SUPPORTS_LIBCILKRTS),y)
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-10-27  9:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26  8:45 [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Yann E. MORIN
2019-10-26  8:45 ` [Buildroot] [PATCH 1/9] core/legal-info: don't require overriding _LICENSE Yann E. MORIN
2019-10-26  8:45 ` [Buildroot] [PATCH 2/9] package: do not override LICENSE, but append to it Yann E. MORIN
2019-10-27  9:40   ` Arnout Vandecappelle
2019-10-26  8:45 ` [Buildroot] [PATCH 3/9] package: get rid of remnants of using := in LICENSE Yann E. MORIN
2019-10-27  9:44   ` Arnout Vandecappelle
2019-10-26  8:45 ` [Buildroot] [PATCH 4/9] package/ligpgme: don't use :=, use += and subst Yann E. MORIN
2019-10-26  8:45 ` [Buildroot] [PATCH 5/9] package/zmqpp: don't override variable Yann E. MORIN
2019-10-26  8:45 ` [Buildroot] [PATCH 6/9] package/gcc: don't override a variable Yann E. MORIN
2019-10-27  9:58   ` Arnout Vandecappelle
2019-10-26  8:45 ` [Buildroot] [PATCH 7/9] fs: don't use := when not needed Yann E. MORIN
2019-10-27  9:45   ` Arnout Vandecappelle
2019-10-26  8:46 ` [Buildroot] [PATCH 8/9] arc/riscv: get rid of immediate-assignment Yann E. MORIN
2019-10-27  9:56   ` Arnout Vandecappelle
2019-10-26  8:46 ` [Buildroot] [PATCH 9/9] utils/check-package: report := that apends to variables Yann E. MORIN
2019-10-27  9:37 ` [Buildroot] [PATCH 0/9] packages: do not use := to append to FOO_LICENSE variables (branch yem/pkg-no-immediate-assignment) Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.