Go to file
Thomas Petazzoni a906c4c4fe package/netsurf: change how CFLAGS/LDFLAGS are passed
Fixes:
http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8
http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44

In commit 6da049f8ae ("package/netsurf:
fix build"), the CC variable passed to netsurf's build system was
extended to pass some special -I and -L options needed for netsurf to
find its own headers/libraries.

Unfortunately, on some systems (including mine), it breaks the build,
due to:

  toolpath_ := $(shell /bin/which $(CC__))

when $(CC__) contains some -I/-L options, they are considered to be
options "to which", which causes the funny:

/usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
/bin/which: invalid option -- 'I'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 'e'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 't'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 's'
/bin/which: invalid option -- '/'
[...]
/bin/which: invalid option -- 'l'
/bin/which: invalid option -- 'b'
/bin/which: --read-alias, -i: Warning: stdin is a tty.

and the build simply hangs.

We cannot pass CFLAGS/LDFLAGS as make options, as they would override
the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
use the construct:

CFLAGS := $(CFLAGS) -more-flags

so by passing CFLAGS and LDFLAGS through the make environment, which
can achieve our goal.

It is worth mentioning that it remains very fragile, because
CFLAGS/LDFLAGS are used both for building target objects but also some
host tools. The netsurf build system is really not good.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 1da0a84f78)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-06-05 22:57:03 +02:00
arch arch/mips: add (Marvell) Octeon III processor 2019-02-04 17:30:18 +01:00
board board/pc: drop unused grub-efi.cfg file 2019-05-26 11:10:07 +02:00
boot boot/syslinux: fix build with binutils note gnu property section 2019-04-14 22:28:25 +02:00
configs configs/qemu_xtensa_lx60_*: kernel build needs mkimage 2019-05-02 08:35:42 +02:00
docs docs/manual: clarify location of local.mk 2019-05-26 11:21:05 +02:00
fs fs/common.mk: disable real chown calls in fakeroot 2019-04-14 22:23:37 +02:00
linux {linux, linux-headers}: bump 4.{9, 14, 19}.x / 5.{0, 1}.x series 2019-05-26 13:45:56 +02:00
package package/netsurf: change how CFLAGS/LDFLAGS are passed 2019-06-05 22:57:03 +02:00
support support/dependencies: Add hint for ArchLinux when host needs IA32 libs 2019-05-26 11:10:27 +02:00
system system: allow selecting merged /usr along with custom rootfs skeleton 2019-02-06 17:11:38 +01:00
toolchain toolchain: add variadic MI thunk support flag 2019-02-04 21:53:20 +01:00
utils utils/getdeveloperlib.py: print warnings/errors to stderr 2019-04-05 22:48:36 +02:00
.defconfig
.flake8 .flake8: ignore utils/diffconfig 2018-03-13 22:37:54 +01:00
.gitignore
.gitlab-ci.yml configs/zynq_zybo: remove defconfig 2019-02-22 22:19:19 +01:00
.gitlab-ci.yml.in .gitlab-ci.yml: use "extends" keyword 2019-02-06 11:40:28 +01:00
CHANGES Update for 2019.02.2 2019-04-29 10:37:21 +02:00
Config.in infra: add force build flag for host dependencies 2019-02-04 15:52:44 +01:00
Config.in.legacy package/gst-plugins-bad: remove apexsink support 2019-03-19 21:33:07 +01:00
COPYING
DEVELOPERS DEVELOPERS: monitor pkg-golang.mk 2019-04-14 23:16:51 +02:00
Makefile Update for 2019.02.2 2019-04-29 10:37:21 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches