Go to file
Fabrice Fontaine 550302c0b9 package/rhash: fix build failure due to gcc -v
With BR2_RELRO_PARTIAL or BR2_RELRO_FULL, our toolchain wrapper will
forcibly add -Wl,-z,relro to any call to the actual compiler. This
usually works OK, because gcc will only use those options it needs for
the compile step it has to carry: pre-processing, compiling, assembling,
or linking, and ignore those options it does not need.

Excpt in one case: when -v is passed standalone, with no input file,
then gcc will falsely believe it has to do a link stage;

    $ gcc -Wl,-z,relro -v
    [...]
    /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
    (.text+0x24): undefined reference to `main'
    collect2: error: ld returned 1 exit status

Fixing that in our wrapper will not be easy, because we'd have to detect
there is no input file. Doing so would probably require we support
almost all gcc options to differentiate between the parameter of an
option (e.g. -I /some/path) from an actual inpout file. This would not
be very robust, and would have a high risk od breaking when we introduce
the next gcc version.

Since it seems that only rhash is affected, due to its inventive,
custom, hand-written configure script, we just patch it to be a bit more
robust in the face of a compiler that could not accept -v, and fallback
to --version.

Fixes:
 - http://autobuild.buildroot.org/results/8605c16cc28316954ce8b9dcc266974390c5da20

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr:
  - retain "$CC -v" as default, fallback to "$CC --version", in the hope
    that it stands better chance with upstream
  - write a commit log to explain the actual root-cause of the build
    failure
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-12-25 23:14:20 +01:00
arch arch/Config.in.powerpc: Drop PPC601 support 2020-12-15 19:30:03 +01:00
board configs/roseapplypi: bump kernel to 5.10.1 2020-12-19 08:34:07 +01:00
boot boot/arm-trusted-firmware: Forward stack protection configuration 2020-12-15 21:24:48 +01:00
configs configs/raspberrypi*: bump kernel version to 967d45b (5.10.1) 2020-12-23 10:12:19 +01:00
docs package/pkg-qmake: add <pkg>_SYNC_QT_HEADERS support 2020-12-05 22:48:47 +01:00
fs fs/jffs2: copy xattrs 2020-10-08 21:48:03 +02:00
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.{4, 9}.x series 2020-12-16 12:22:51 +01:00
package package/rhash: fix build failure due to gcc -v 2020-12-25 23:14:20 +01:00
support support/dependencies: set cmake version min to 3.15 2020-12-25 16:21:27 +01:00
system system: support br2-external init systems 2020-10-14 22:48:42 +02:00
toolchain {linux, linux-headers}: add version 5.10 2020-12-14 16:03:08 +01:00
utils utils/getdeveloperlib.py: fix issue with hasfile() 2020-11-17 23:47:01 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore
.gitlab-ci.yml gitlab-ci: update the image version 2020-08-15 09:47:00 +02:00
CHANGES Update for 2020.11 2020-12-02 23:21:32 +01:00
Config.in Config.in: update BR2_OPTIMIZE_FAST prompt and help text 2020-07-18 16:05:01 +02:00
Config.in.legacy package/qoriq-rcw: rename from package/rcw 2020-12-16 19:34:45 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS package/perl-math-int64: new package 2020-12-21 10:28:36 +01:00
Makefile Kickoff 2021.02 cycle 2020-12-03 08:43:41 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

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