<feed xmlns='http://www.w3.org/2005/Atom'>
<title>staging/dedeckeh/include/package.mk, branch master</title>
<subtitle>Staging tree of dedeckeh</subtitle>
<id>https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/atom?h=master</id>
<link rel='self' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/'/>
<updated>2023-03-21T17:28:24Z</updated>
<entry>
<title>build: add a config knob to enable LTO for all packages</title>
<updated>2023-03-21T17:28:24Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-01-28T14:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=9ea7019ffd60ab3ef5a5654116fbc339f856482c'/>
<id>urn:sha1:9ea7019ffd60ab3ef5a5654116fbc339f856482c</id>
<content type='text'>
This enables LTO for all packages which haven't opted-out.

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: add a config knob to enable gc-sections for all packages</title>
<updated>2023-03-21T17:28:23Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-02-03T12:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=aef8bab9d71d85dcb6d99ff70078be3f2bdfbf61'/>
<id>urn:sha1:aef8bab9d71d85dcb6d99ff70078be3f2bdfbf61</id>
<content type='text'>
This enables the linker's garbage collection for all packages which haven't
opted-out.

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: add support for "lto" in PKG_BUILD_FLAGS</title>
<updated>2023-03-21T17:28:22Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-02-02T20:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=07730ff3465d3cede3026cdd1c17453930f055ce'/>
<id>urn:sha1:07730ff3465d3cede3026cdd1c17453930f055ce</id>
<content type='text'>
This reduces open coding and allows to easily add a knob to enable
it treewide, where chosen packages can still opt-out via "no-lto".

Some packages used LTO, but not the linker plugin. This unifies 'em
all to attempt to produce better code.
Quoting man gcc(1):
"This improves the quality of optimization by exposing more code to the
link-time optimizer."

Also use -flto=auto instead of -flto=jobserver, as it's not guaranteed
that every buildsystem uses +$(MAKE) correctly.

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: add support for "gc-sections" in PKG_BUILD_FLAGS</title>
<updated>2023-03-21T17:28:22Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-02-02T20:16:21Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=da3700988d9e34e380bae21ee23d5458a7e972b4'/>
<id>urn:sha1:da3700988d9e34e380bae21ee23d5458a7e972b4</id>
<content type='text'>
This reduces open coding and allows to easily add a knob to
enable it treewide, where chosen packages can still opt-out via
"no-gc-sections".

Note: libnl, mbedtls and opkg only used the CFLAGS part without the
LDFLAGS counterpart. That doesn't help at all if the goal is to produce
smaller binaries. I consider that an accident, and this fixes it.

Note: there are also packages using only the LDFLAGS part. I didn't
touch those, as gc might have been disabled via CFLAGS intentionally.

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>treewide: replace PKG_USE_MIPS16:=0 with PKG_BUILD_FLAGS:=no-mips16</title>
<updated>2023-03-21T17:28:22Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-02-02T19:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=5c545bdb365a78b8995ddfa441a6018f7ff3c011'/>
<id>urn:sha1:5c545bdb365a78b8995ddfa441a6018f7ff3c011</id>
<content type='text'>
Keep backwards compatibility via PKG_USE_MIPS16 for now, as this is
used in all package feeds.

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: introduce PKG_BUILD_FLAGS and move PKG_IREMAP to it</title>
<updated>2023-03-21T17:28:18Z</updated>
<author>
<name>Andre Heider</name>
</author>
<published>2023-02-02T18:20:42Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=0a44c579a1ab3f699ad84728cc6cde78c99ba1d1'/>
<id>urn:sha1:0a44c579a1ab3f699ad84728cc6cde78c99ba1d1</id>
<content type='text'>
PKG_BUILD_FLAGS is a new variable for package Makefiles similar to
PKG_FLAGS. It's a whitespace separated list of flags to control various
aspects of how a package is build.

The build system and/or .config defines the default for each, but
every package has the means to override it. Using $flagname enables
a flag, no-$flagname disables it.

Start with PKG_IREMAP as "iremap". That's easy as no package here
nor in any package feed uses it. The default is unchanged: enabled.

Packages can opt-out via:
PKG_BUILD_FLAGS:=no-iremap
(Not that any should, just to illustrate how to use it)

Signed-off-by: Andre Heider &lt;a.heider@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: make find_md5 reproducible with AUTOREMOVE</title>
<updated>2022-09-30T20:26:51Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-09-06T14:48:37Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=53a08e37437972ba0a8fbf953a93a70a6b784ef4'/>
<id>urn:sha1:53a08e37437972ba0a8fbf953a93a70a6b784ef4</id>
<content type='text'>
While experimenting with the AUTOREMOVE option in search of a way to use
prebuilt host tools in different buildroot, it was discovered that the
md5 generated by find_md5 in depends.mk is not reproducible.

Currently the hash is generated by the path of the file in addition to
the file mod time. Out of confusion, probably, there was an idea that
such command was used on the package build_dir. Reality is that this
command is run on the package files. (Makefile, patches, src)

This is problematic because the package Makefile (for example) change at
each git clone and base the hash on the Makefile mtime doesn't really
reflect if the Makefile actually changes across a buildroot or not.

A better approach is to generate an hash of each file and then generate
an hash on the sort hash list. This way we remove the problem of git
clone setting a wrong mtime while keeping the integrity of checking if a
file changed for the package as any change will result in a different
hash.

Introduce a new kind of find_md5 function, find_md5_reproducible that
apply this new logic and limit it only with AUTOREMOVE option set to
prevent any kind of slowdown due to additional hash generation.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: handle directory with whitespace in AUTOREMOVE clean</title>
<updated>2022-09-11T09:27:02Z</updated>
<author>
<name>Christian Marangi</name>
</author>
<published>2022-09-07T21:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=dccee21792b89031bcd801030de403f195d80278'/>
<id>urn:sha1:dccee21792b89031bcd801030de403f195d80278</id>
<content type='text'>
Package with whitespace in their build directory are not correctly
removed when CONFIG_AUTOREMOVE is enabled. This is caused by xargs that
use whitespace as delimiters. To handle this use \0 as the delimiter and
set find to use \0 as the delimiter.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: fix host package unpack if git-src is used</title>
<updated>2021-11-04T15:43:32Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2021-11-04T14:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=9faa22fcee8f9bc5310239661838ab68c7e7c104'/>
<id>urn:sha1:9faa22fcee8f9bc5310239661838ab68c7e7c104</id>
<content type='text'>
If the package download step is skipped, it needs to be performed for the host
build instead.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>download: improve handling of invalid local files</title>
<updated>2021-11-01T19:18:55Z</updated>
<author>
<name>Eneas U de Queiroz</name>
</author>
<published>2021-08-19T21:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git-03.infra.openwrt.org/openwrt/staging/dedeckeh/commit/?id=8cf4d4df5560f6771f74c3124870e8a23094aff3'/>
<id>urn:sha1:8cf4d4df5560f6771f74c3124870e8a23094aff3</id>
<content type='text'>
4e19cbc5533: [download: handle possibly invalid local tarballs] added a
FORCE rule to downloaded files, so that they will be always checked by
download.pl.

As a side-effect, check-compile will fail, forcing unnecessary package
rebuilds.
The check-compile.txt log shows (for libxml2 for example):
  Considering target file '.../dl/libxml2-2.9.12.tar.gz'.
    ...
    prerequisite 'FORCE' of target '.../dl/libxml2-2.9.12.tar.gz' does
    not exist.
    Must remake target '.../dl/libxml2-2.9.12.tar.gz'.
    ...
   Giving up on target file '...libxml2-2.9.12/.prepared_...'.
   Giving up on target file '...libxml2-2.9.12/.configured_...'.
   Giving up on target file '...libxml2-2.9.12/.built'.
   Giving up on target file '...stamp/.libxml2_installed'.
  Giving up on target file '.compile'.

Then the package is rebuilt even if it is not otherwise needed.

To fix this, instead of always forcing the download target to be remade,
check its hash first: if it matches, then the FORCE is not added.

Signed-off-by: Eneas U de Queiroz &lt;cotequeiroz@gmail.com&gt;
</content>
</entry>
</feed>
