summaryrefslogtreecommitdiffstats
path: root/scripts/wrapper
Commit message (Collapse)AuthorAgeFilesLines
* hardening: add option for -fstack-clash-protectionMichael Olbrich2019-02-211-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_init_*_env: use -B instead of -LMichael Olbrich2018-11-171-1/+1
| | | | | | | | | | | It's not quite correct, but it shouldn't hurt and with -B the path is added to 'libraries:' in 'gcc -print-search-dirs'. Libtool uses this for manual seaching. This avoid explicit paths to .la files found in the system when building host packages. Also assume -print-search-dirs means compiling/linking to ensure the options are used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: try to make all debug paths relative to PTXDIST_WORKSPACEMichael Olbrich2018-10-034-0/+8
| | | | | | | | | | | The debug sections containing these paths are used to calculate the build-id, so building a BSP in a different directory will result in a different build-id even if nothing else changes. Avoid this by using -fdebug-prefix-map to make the paths relative. Also expand the gdb wrapper to handle this even if it is called from a different directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: improve blacklist handlingMichael Olbrich2018-07-091-0/+5
| | | | | | | | | | | | Explicitly disable build-id if it is blacklisted. It may be enabled by default in the toolchain. Use TARGET_HARDEN_STACK to blacklist all stack protector options. Note: With 'dash', variables for a specific command remain set afterwards if the command is a shell function. Use '()' to make sure the existing value is not overwritten. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: don't use target LDFLAGS for host toolsMichael Olbrich2018-05-201-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: improve local extra argument handlingMichael Olbrich2018-04-224-4/+14
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add rpath-link for some rpathsMichael Olbrich2018-04-181-0/+3
| | | | | | | | | | | | | | | With new versions of binutils, ld will prepend the sysroot to all absolute rpaths before using them at build time. This breaks rpaths for build directories. Specifically it breaks building the gobject-introspection helper programs. Fix this by adding the same path with -rpath-link. Note: This is incomplete: It only works for "-Wl,-rpath,<path>" but not for "-Wl,-rpath -Wl,<path>". It fixes all known issues in PTXdist so it is good enough for now. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* gdb-wrapper: add the nfsroot to the auto-load safe-pathMichael Olbrich2018-03-021-0/+1
| | | | | | | The only useable path for auto-load scripts is right next to the corresponding binary. Anything else is broken when working with a sysroot. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add -fno-diagnostics-show-caret when using iceccMichael Olbrich2018-02-281-0/+11
| | | | | | | Otherwise icecc may need to rebuild files locally. Especially qt4 seems to be affected by this. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* Debugging: add support for 'build-id'sJuergen Borleis2017-06-211-0/+7
| | | | | | | | | | | | | | | | | | | | Recent debugging tools support separate binaries and debug information files. Providing a unique 'build-id' embedded in the binary enables the debugging tools to select the correct and matching debug information files from the system's root filesystem. The 'build-id' is a 40 character calculated SHA1 from important sections in the binary. The debug information files get stored at a central direcory at "/usr/lib/debug/", with a special path based on the 'build-id'. If the 'build-id' is "123456789abcdef", the path and filename will be ".build-id/12/3456789abcdef.debug". Its possible to have more than one 'build-id' in the binary. This implementation prefers the first one in the list, which might be the wrong one. It's unclear yet how the common debugging tools will behave in this case. Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
* wrapper: add gdb wrapperMichael Olbrich2017-06-211-0/+11
| | | | | | Add arguments to set sysroot and debug-file-directory. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: disable icecc in fakerootMichael Olbrich2017-04-111-0/+3
| | | | | | | | | | icecc creates temporary files with the username in the name. In fakeroot the username is 'root' so this can cause collisions in multi-user environments. Nothing is supposed to be compiled in fakeroot, but it can happen during 'make install' due to broken dependencies. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add PTXDIST_CROSS_CPPFLAGS lateMichael Olbrich2016-10-211-1/+1
| | | | | | | | | | | | These are only the -isystem arguments for sysroot. They should be added at the end of the commandline. This way any other -isystem generated by the package build system has priority. This fixes building Qt5 packages if Qt4 is installed as well. For Q55 qmake produces '-isystem <sysroot>/usr/include/qt5'. Without this the Qt4 headers in <sysroot>/usr/include are used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add more stack protector optionsMichael Olbrich2016-06-171-0/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: allow package specific LDFLAGS for host packagesMichael Olbrich2015-12-111-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: fix linking with goldMichael Olbrich2014-12-021-3/+3
| | | | | | gold only supports '-z option' not '-z,option' Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wapper: improve icecc handlingMichael Olbrich2014-06-195-5/+24
| | | | | | | always set ICECC_CC/ICECC_CXX. Otherwise icecc may use the wrong compiler, e.g. /usr/bin/gcc instead of $PTXCONF_SETUP_HOST_CC. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add support for iceccMichael Olbrich2014-06-185-2/+8
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: don't use target flags for the host compilerMichael Olbrich2014-06-091-3/+9
| | | | | | | | When building target packages, the host compiler may be used to build something. Don't add the packages specific flags here. They may be architecture specific. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add '-mfpu=neon' for PTXCONF_ARCH_ARM_NEONMichael Olbrich2014-06-081-0/+6
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* introduce <PKG>_{CPPFLAGS,CFLAGS,CXXFLAGS,LDFLAGS}Michael Olbrich2014-06-081-0/+7
| | | | | | | The toolchain wrapper adds these package specific flags when appropriate. They are added right before PTXCONF_TARGET_EXTRA_* Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: fix debug handlingMichael Olbrich2013-10-031-1/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: allow blacklisting all debug options with TARGET_DEBUGMichael Olbrich2013-09-291-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: make -frecord-gcc-switches optionalMichael Olbrich2013-09-101-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add debugging optionsMichael Olbrich2013-09-101-0/+8
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: define add_late_opt_arg()Michael Olbrich2013-09-101-4/+15
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: remove wrapper dir from PATH before executing the real toolMichael Olbrich2013-05-061-0/+1
| | | | | | | | | This avoid recursions in case the 'real' tool is also a script that uses PATH to find the tool to execute. This fixes Problems on Fedora where ccache wrappers are in $PATH by default. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* Fix (host) gcc wrapper on Gentoo LinuxBernhard Walle2013-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | On Gentoo, the host compiler can only be executed if basename(argv[0]) is 'gcc' (or 'g++' etc.), not if it's 'gcc.real'. Then it invokes gcc-config and fails: | % ln -s /usr/bin/gcc gcc.real | % ./gcc.real --version | | * gcc-config: Could not get portage CHOST! | * gcc-config: You should verify that CHOST is set in one of these places: | * gcc-config: - //etc/portage/make.conf | * gcc-config: - active environment | gcc-config: error: could not get compiler binary path: No such file or directory I'm not a Gentoo expert (I'm just forced to use it for that purpose ;-)), so I cannot explain further details. This patch makes ptxdist working on Gentoo by changing the symbolic link from <name>.real to real/<name>, i.e. moving the final toolchain symlink to some other directory, keeping the basename. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> [mol: use shell magic instead of dirname/basename] Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: save some variables duing initializationMichael Olbrich2013-02-081-0/+4
| | | | | | | This way they can be included in the wrapper scripts and the wrapper can be used outside of PTXdist. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* scripts/wrapper: exit in case of errorMarc Kleine-Budde2013-02-051-0/+2
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: add host-wrapper, but do not enable yetMarc Kleine-Budde2013-02-054-3/+62
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: give functions adding target flags a proper nameMarc Kleine-Budde2013-02-054-11/+11
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: remove space before closing parenthesisMarc Kleine-Budde2013-02-051-3/+3
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: sort variables alphabeticallyMarc Kleine-Budde2013-02-051-3/+4
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: cpp-wrapper: use false instead of 0 to set LINKINGMarc Kleine-Budde2013-02-051-1/+1
| | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* scripts/wrapper: don't use CCACHE for cpp or ldMarc Kleine-Budde2013-02-042-0/+3
| | | | | | Otherwise libpng compilation will fail. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
* wrapper: fix copy/paste error in add_late_argMichael Olbrich2012-12-161-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add options for --as-neededMichael Olbrich2012-12-161-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: add library search paths at the endMichael Olbrich2012-12-141-6/+9
| | | | | | | This way they are searched after any paths specified in the original command line. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: don't add linker flags if there is nothing to linkMichael Olbrich2012-12-101-1/+10
| | | | | | Otherwise the linker may be called anyways and returns with an error. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: fix ld args for '$*' == '-v'Michael Olbrich2012-12-061-1/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: abort if system paths are addedMichael Olbrich2012-11-281-0/+5
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: optimizeMichael Olbrich2012-11-205-37/+39
| | | | | | | | | - use /bin/sh instead of /bin/bash - don't use grep This is a lot faster if /bin/sh is dash Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* wrapper: introduce a wrapper for cc, c++, cpp and ldJan Luebbe2012-11-205-0/+186
| | | | | | | | | | | This is used to inject compiler and linker options without relying on the build-systems to pass additional options to the tools. It is used for options needed for cross-compiling, hardening flags and other user defined options. The wrapper also calls ccache if ptxdist is configured to use it. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* Revert "wrapper: introduce a wrapper for cc, c++ and ld"Michael Olbrich2012-10-254-114/+0
| | | | | | | | | accidentally pushed WIP stuff This reverts commit 1e7dd9c2f9c708060786d1f9ffc7caac8b270887. This reverts commit 8121f1cf41cb87505e75f8ce8cc02afaaffbdbf8. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* fixup! wrapper: introduce a wrapper for cc, c++ and ldMichael Olbrich2012-10-254-62/+104
|
* wrapper: introduce a wrapper for cc, c++ and ldJan Luebbe2012-10-253-0/+72
This is used to optionally pass compiler and linker options (such as for hardening). Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>