<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox.git/Makefile.flags, branch 1_34_stable</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/'/>
<entry>
<title>Makefile.flags: add a test for -lrt availability</title>
<updated>2021-04-14T17:01:53+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-04-14T17:01:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=eb1b2902b8b7b7effdba711645288c64884fd3e7'/>
<id>eb1b2902b8b7b7effdba711645288c64884fd3e7</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>trylink: do not drop libs from CONFIG_EXTRA_LDLIBS</title>
<updated>2021-02-23T22:09:49+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-02-23T22:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=1f9ed02caffb269e5fc6fbdf19fc9ba05a79e628'/>
<id>1f9ed02caffb269e5fc6fbdf19fc9ba05a79e628</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile.flags: fix the OS detection for libresolv</title>
<updated>2021-02-07T08:35:04+00:00</updated>
<author>
<name>Martin Kaiser</name>
<email>martin@kaiser.cx</email>
</author>
<published>2021-01-22T21:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=d40358a1c52079e238c48bf40bff504e55a9f758'/>
<id>d40358a1c52079e238c48bf40bff504e55a9f758</id>
<content type='text'>
054493350 ("Do not add -lresolv on non-Linux systems") adds a condition
to link with libresolv only on linux systems.

The check requires that CONFIG_UNAME_OSNAME equals Linux. This works only
if the uname applet is enabled. Otherwise, CONFIG_UNAME_OSNAME is empty,
regardless of the platform.

By default, CONFIG_UNAME_OSNAME is the output of uname -o. For most
linux systems, uname -o returns "GNU/Linux" and the check fails. In this
case, linking a static busybox fails because of missing symbols from
libresolv.

networking/lib.a(nslookup.o): In function `add_query':
nslookup.c:789: undefined reference to `__res_mkquery'
networking/lib.a(nslookup.o): In function `parse_reply':
nslookup.c:355: undefined reference to `ns_initparse'
nslookup.c:361: undefined reference to `ns_parserr'
nslookup.c:404: undefined reference to `ns_name_uncompress'
nslookup.c:418: undefined reference to `ns_get16'
nslookup.c:419: undefined reference to `ns_name_uncompress'
..
nslookup.c:456: undefined reference to `ns_get16'
...
nslookup.c:469: undefined reference to `ns_name_uncompress'
...
nslookup.c:489: undefined reference to `ns_get32'
...
collect2: error: ld returned 1 exit status

This patch uses the output of $CC -dumpmachine to detect the target platform
for which we compile. Both gcc and clang support -dumpmachine. Like the
original patch, we link against libresolv only if our target platform is
linux-based.

Fixes: 054493350 ("Do not add -lresolv on non-Linux systems")
Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
054493350 ("Do not add -lresolv on non-Linux systems") adds a condition
to link with libresolv only on linux systems.

The check requires that CONFIG_UNAME_OSNAME equals Linux. This works only
if the uname applet is enabled. Otherwise, CONFIG_UNAME_OSNAME is empty,
regardless of the platform.

By default, CONFIG_UNAME_OSNAME is the output of uname -o. For most
linux systems, uname -o returns "GNU/Linux" and the check fails. In this
case, linking a static busybox fails because of missing symbols from
libresolv.

networking/lib.a(nslookup.o): In function `add_query':
nslookup.c:789: undefined reference to `__res_mkquery'
networking/lib.a(nslookup.o): In function `parse_reply':
nslookup.c:355: undefined reference to `ns_initparse'
nslookup.c:361: undefined reference to `ns_parserr'
nslookup.c:404: undefined reference to `ns_name_uncompress'
nslookup.c:418: undefined reference to `ns_get16'
nslookup.c:419: undefined reference to `ns_name_uncompress'
..
nslookup.c:456: undefined reference to `ns_get16'
...
nslookup.c:469: undefined reference to `ns_name_uncompress'
...
nslookup.c:489: undefined reference to `ns_get32'
...
collect2: error: ld returned 1 exit status

This patch uses the output of $CC -dumpmachine to detect the target platform
for which we compile. Both gcc and clang support -dumpmachine. Like the
original patch, we link against libresolv only if our target platform is
linux-based.

Fixes: 054493350 ("Do not add -lresolv on non-Linux systems")
Signed-off-by: Martin Kaiser &lt;martin@kaiser.cx&gt;
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not add -lresolv on non-Linux systems</title>
<updated>2021-01-04T12:28:28+00:00</updated>
<author>
<name>Alex Samorukov</name>
<email>samm@os2.kiev.ua</email>
</author>
<published>2021-01-04T00:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=054493350124d36e531a26e982518696c038a6c1'/>
<id>054493350124d36e531a26e982518696c038a6c1</id>
<content type='text'>
On FreeBSD getaddrinfo and friends are part of libc.
Other OS-es will also have own dependencies

Signed-off-by: Alex Samorukov &lt;samm@os2.kiev.ua&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On FreeBSD getaddrinfo and friends are part of libc.
Other OS-es will also have own dependencies

Signed-off-by: Alex Samorukov &lt;samm@os2.kiev.ua&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build system: make -static-libgcc selectable in config</title>
<updated>2020-12-16T20:53:05+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-16T20:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=39646dce329c1b88b1de8ef0c450813765fda202'/>
<id>39646dce329c1b88b1de8ef0c450813765fda202</id>
<content type='text'>
OpenWrt wants this off.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenWrt wants this off.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile.flags: restrict Wno-constant-logical-operand and Wno-string-plus-int options for clang</title>
<updated>2020-06-10T12:33:19+00:00</updated>
<author>
<name>Biswapriyo Nath</name>
<email>nathbappai@gmail.com</email>
</author>
<published>2020-06-09T17:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=505eeae402a84dc5208986c5ad611f5e485cbe34'/>
<id>505eeae402a84dc5208986c5ad611f5e485cbe34</id>
<content type='text'>
these options were added in b4ef2e3467d8e980ccf13c9dd342459c013b455f commit
gcc shows unrecognized command-line option warnings

Signed-off-by: Biswapriyo Nath &lt;nathbappai@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these options were added in b4ef2e3467d8e980ccf13c9dd342459c013b455f commit
gcc shows unrecognized command-line option warnings

Signed-off-by: Biswapriyo Nath &lt;nathbappai@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build system: remove KBUILD_STR()</title>
<updated>2020-04-29T12:52:19+00:00</updated>
<author>
<name>Jean-Philippe Brucker</name>
<email>jean-philippe@linaro.org</email>
</author>
<published>2020-03-12T16:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=ed8af51b600fd16d22c6663a241547c3a9d7f2b4'/>
<id>ed8af51b600fd16d22c6663a241547c3a9d7f2b4</id>
<content type='text'>
When using GNU Make &gt;=4.3, the KBUILD_STR() definition interferes badly
with dependency checks during build, and forces a complete rebuild every
time Make runs.

In if_changed_rule, Kconfig checks if the command used to build a file
has changed since last execution. The previous command is stored in the
generated .&lt;file&gt;.o.cmd file. For example applets/.applets.o.cmd defines
a "cmd_applets/applets.o" variable:

	cmd_applets/applets.o := gcc ... -D"KBUILD_STR(s)=#s" ...

Here the '#' should be escaped with a backslash, otherwise GNU Make
interprets it as starting a comment, and ignore the rest of the
variable. As a result of this truncation, the previous command doesn't
equal the new command and Make rebuilds each target.

The problem started to appear when GNU Make 4.3 (released January 2020),
introduced a backward-incompatible fix to macros containing a '#'. While
the above use of '#', a simple Make variable, still needs to be escaped,
a '#' within a function invocation doesn't need to be escaped anymore.
As Martin Dorey explained on the GNU Make discussion [1], the above
declaration is generated from make-cmd, defined as:

	make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))

Since GNU Make 4.3, the first argument of subst should not have a
backslash. make-cmd now looks for literally \# and doesn't find it, and
as a result doesn't add the backslash when generating .o.cmd files.

[1] http://savannah.gnu.org/bugs/?20513

We could fix it by changing make-cmd to "$(subst #,\#,...)", but to
avoid compatibility headaches, simply get rid of the KBUILD_STR
definition, as done in Linux by b42841b7bb62 ("kbuild: Get rid of
KBUILD_STR"). Quote the string arguments directly rather than asking the
preprocessor to quote them.

Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using GNU Make &gt;=4.3, the KBUILD_STR() definition interferes badly
with dependency checks during build, and forces a complete rebuild every
time Make runs.

In if_changed_rule, Kconfig checks if the command used to build a file
has changed since last execution. The previous command is stored in the
generated .&lt;file&gt;.o.cmd file. For example applets/.applets.o.cmd defines
a "cmd_applets/applets.o" variable:

	cmd_applets/applets.o := gcc ... -D"KBUILD_STR(s)=#s" ...

Here the '#' should be escaped with a backslash, otherwise GNU Make
interprets it as starting a comment, and ignore the rest of the
variable. As a result of this truncation, the previous command doesn't
equal the new command and Make rebuilds each target.

The problem started to appear when GNU Make 4.3 (released January 2020),
introduced a backward-incompatible fix to macros containing a '#'. While
the above use of '#', a simple Make variable, still needs to be escaped,
a '#' within a function invocation doesn't need to be escaped anymore.
As Martin Dorey explained on the GNU Make discussion [1], the above
declaration is generated from make-cmd, defined as:

	make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))

Since GNU Make 4.3, the first argument of subst should not have a
backslash. make-cmd now looks for literally \# and doesn't find it, and
as a result doesn't add the backslash when generating .o.cmd files.

[1] http://savannah.gnu.org/bugs/?20513

We could fix it by changing make-cmd to "$(subst #,\#,...)", but to
avoid compatibility headaches, simply get rid of the KBUILD_STR
definition, as done in Linux by b42841b7bb62 ("kbuild: Get rid of
KBUILD_STR"). Quote the string arguments directly rather than asking the
preprocessor to quote them.

Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile.flags: suppress some clang-9 warnings</title>
<updated>2019-10-25T10:56:51+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-10-25T10:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=b4ef2e3467d8e980ccf13c9dd342459c013b455f'/>
<id>b4ef2e3467d8e980ccf13c9dd342459c013b455f</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove syscall wrappers around clock_gettime, closes 12091</title>
<updated>2019-10-24T14:26:55+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2019-10-24T14:26:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=be5a505d771a77c640acc35ceaa470c80e62f954'/>
<id>be5a505d771a77c640acc35ceaa470c80e62f954</id>
<content type='text'>
12091 "Direct use of __NR_clock_gettime is not time64-safe".

function                                             old     new   delta
runsv_main                                          1698    1712     +14
startservice                                         378     383      +5
get_mono                                              31      25      -6
date_main                                            932     926      -6
gettimeofday_ns                                       17       -     -17
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/2 up/down: 19/-29)            Total: -10 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
12091 "Direct use of __NR_clock_gettime is not time64-safe".

function                                             old     new   delta
runsv_main                                          1698    1712     +14
startservice                                         378     383      +5
get_mono                                              31      25      -6
date_main                                            932     926      -6
gettimeofday_ns                                       17       -     -17
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/2 up/down: 19/-29)            Total: -10 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build system: FEATURE_NSLOOKUP_BIG needs -lresolv</title>
<updated>2018-04-16T09:04:03+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2018-04-16T09:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/busybox.git/commit/?id=fa87abe807530daeb46f6730d4231489a4e2782b'/>
<id>fa87abe807530daeb46f6730d4231489a4e2782b</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
