mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Rüdiger, Christoph" <Christoph.Ruediger@thyssenkrupp.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] (no subject)
Date: Fri, 27 Feb 2015 08:48:42 +0000	[thread overview]
Message-ID: <1E9AED858BEB204B9DE4F807C7ED0EF617CE151F@EMSRVWIN2934.apps.edc.thyssenkrupp.com> (raw)
In-Reply-To: <20150226122349.GA14430@pengutronix.de>



Am 26.02.15 um 13:23 schrieb Michael Olbrich:> On Tue, Feb 24, 2015 at 09:28:29PM +0000, Rüdiger, Christoph wrote:
>> Am 23.02.15 um 12:24 schrieb Michael Olbrich:> On Mon, Feb 23, 2015 at 09:13:56AM +0000, Rüdiger, Christoph wrote:
>>>>> On Mon, Feb 23, 2015 at 01:38:40AM +0200, Anders Montonen wrote:
>>>>>>
>>>>>>> On 22 Feb 2015, at 21:17, Christoph Rüdiger <christoph.ruediger@rwth-
>>>>> aachen.de> wrote:
>>>>>>> Am 22.02.15 um 10:38 schrieb Michael Olbrich:
>>>>>>>
>>>>>>>> I don't know why the bash in Max OS X cannot handle this. Maybe it's
>>>>> too
>>>>>>>> old? What version are you using?
>>>>>>> Your assumption is right. My OS X is 10.9.5 (Mavericks) and way newer
>>>>>>> than the Ubuntu 10.04.4 which is the oldest system where I use ptxdist
>>>>>>> for my day-to-day work. That's why I didn't took the version numbers
>>>>>>> into account. But I was wrong:
>>>>>>>
>>>>>>> Ubuntu 10.04.4: bash 4.1.5(1)-release
>>>>>>> OS X 10.9.5: bash 3.2.53(1)-release
>>>>>>
>>>>>> As you might have guessed, Bash 3.2 was the last version to be released
>>>>> under
>>>>>> the GPLv2 license, and Apple will not distribute any software covered by
>>>>>> GPLv3.
>>>>>
>>>>> So you'll be stuck with the old version. Let's see if we can stay
>>>>> compatible.
>>>>
>>>> You need to install a lot of GNU tools from exteranl sources (homebrew,
>>>> MacPorts, Fink), so I do not see any problem in including bash into this
>>>> list. My bigger problem is now, that there is no GNU linker available on OS
>>>> X, so you need to use the LLVM linker which does not understand the
>>>> -Wl,--as-needed flag. I need to dig deeper to understand since when GNU gcc
>>>> set this flag by default and what the drawback is, if we remove this flag
>>>> from the PTXDIST_HOST_LDFLAGS.
>>>
>>> Hmm, "-Wl,--as-needed" should not be added implicitly and ptxdist should
>>> only add it for target packages if PTXCONF_TARGET_LINKER_AS_NEEDED is set.
>>
>> You are right. I just cross-read an article and got the information wrong.
>> According to the GNU ld man page [1], --as-needed affects the DT_NEEDED flag
>> only of dynamic libraries given _after_ --as-needed. As ptxdist sets it as
>> the very last flag (see below), it is a useless flag.
> 
> Which ptxdist version are you using?

For this project, I need to stick with ptxdist-2013.12.0 for building OSELAS toolchain 2013.12.2.

> At least for target packages we set it
> in the right place. For me it looks like this:
> [...]
> wrapper: /usr/bin/icecc arm-v7a-linux-gnueabihf-gcc  -Wl,--as-needed -isystem [...]/platform-arm-hf/sysroot-target/include -isystem [...]/platform-arm-hf/sysroot-target/usr/include  -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a -L[...]/platform-arm-hf/sysroot-target/lib -L[...]/platform-arm-hf/sysroot-target/usr/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/lib -Wl,-rpath-link -Wl,[...]/platform-arm-hf/sysroot-target/usr/lib
> [...]
> 
> The wrapper script adds it before the other options.
> 
>>> If you start ptxdist with '-v' then all calls to the compiler and linker
>>> are logged. Look for lines starting with 'wrapper:' in the logfile.
>>
>>
>> wrapper:  gcc  -isystem /Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/include -O3 -DNO_FSEEKO -DNO_STRERROR -DNO_vsnprintf -o minigzip minigzip.o -L. libz.a -L/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/Volumes/BlueBox/src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/sysroot-host/lib -Wl,-rpath -Wl,/this/is/a/long/path/to/make/host/tools/relocateable/with/chrpath/when/using/dev/packages -Wl,--as-needed
> 
> I'm not sure where the "-Wl,--as-needed" is comming from. The only thing
> that is added at the end of the command-line is PTXDIST_HOST_LDFLAGS and
> that's just the -L / -Wl,-rpath stuff.

I've performed a simple grep and stripped out the wrapper and exec lines from the logfiles. This grep searched in the installed ptxdist, the ptxdist sources and the OSELAS sources, as I'm not quite sure, if it is coming from ptxdist or OSELAS toolchain project. But I tend to blame ptxdist ;-)

Remember: The compilation of host-zlib within the OSELAS toolchain project fails.

$ grep -r -- '-Wl,--as-needed' *
lib/ptxdist-2013.12.0/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
lib/ptxdist-2013.12.0/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
lib/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
lib/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/binutils-2.24/ld/testsuite/ld-plugin/lto.exp:   "-flto -fuse-linker-plugin -Wl,--as-needed" "-flto"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/binutils-2.24/ld/testsuite/ld-plugin/lto.exp:   "-O2 -flto -fuse-linker-plugin -Wl,--as-needed tmpdir/pr13201.o -lm" ""
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/acinclude.m4:    dnl Check whether -Wl,--as-needed is supported
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/acinclude.m4:      LDFLAGS="$LDFLAGS -Wl,--as-needed -lm -Wl,--no-as-needed"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-cross/gcc-linaro-4.8-2013.11/libgfortran/configure:      LDFLAGS="$LDFLAGS -Wl,--as-needed -lm -Wl,--no-as-needed"
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/.pc/0100-add-install-lib-all-target.patch/Makerules:	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makeconfig:as-needed := -Wl,--as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makeconfig:libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed
src/OSELAS.Toolchain-2013.12.2/platform-arm-cortexa8-linux-gnueabihf-gcc-4.8.3-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/build-target/glibc-2.18/Makerules:	  -Wl,--as-needed $(build-module-objlist) -Wl,--no-as-needed \
src/OSELAS.Toolchain-2013.12.2/rules/pre/toolchain.make:PTXDIST_HOST_LDFLAGS				+= -Wl,--as-needed
src/a/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/a/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/a/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/a/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/b/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/b/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/b/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/b/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/ptxdist-2013.12.0/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0.orig/patches/cppunit-1.12.1/0002-libcppunit-needs-ldl-dlopen-dlclose-etc.patch:Without this building with -Wl,--as-needed fails later with
src/ptxdist-2013.12.0.orig/patches/eggdbus-0.6/0003-update-autotoolization.patch:   LDFLAGS="-Wl,--as-needed $LDFLAGS"
src/ptxdist-2013.12.0.orig/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed
src/ptxdist-2013.12.0.orig/patches/lshw-B.02.14/0001-fix-cross-compilation.patch: 	LDFLAGS+= -Wl,--as-needed



>> And here is the missing BASH_VERSINFO of Apple's bash:
>> $ set | grep BASH_VERSINFO
>> BASH_VERSINFO=([0]="3" [1]="2" [2]="53" [3]="1" [4]="release" [5]="x86_64-apple-darwin13")
> 
> So we could check for the version.

Regards,
Christoph

-- 
ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger@thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany 
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2015-02-27  8:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 23:07 Rüdiger, Christoph
2015-02-21 23:11 ` Jon Ringle
2015-02-21 23:29   ` Rüdiger, Christoph
2015-02-21 23:43     ` Rüdiger, Christoph
2015-02-22  9:38 ` Michael Olbrich
2015-02-22 19:17   ` Christoph Rüdiger
2015-02-22 23:38     ` Anders Montonen
2015-02-23  8:33       ` Michael Olbrich
2015-02-23  9:13         ` Rüdiger, Christoph
2015-02-23 11:24           ` Michael Olbrich
2015-02-24 21:28             ` Rüdiger, Christoph
2015-02-26 12:23               ` Michael Olbrich
2015-02-27  8:48                 ` Rüdiger, Christoph [this message]
2015-02-27  9:06                   ` Michael Olbrich
2015-02-27  9:24                     ` Rüdiger, Christoph
2015-02-27 10:32                       ` Juergen Borleis
2015-02-27 15:36                       ` Michael Olbrich
2015-02-27  9:23                   ` Juergen Borleis
2015-02-27  9:31                     ` Rüdiger, Christoph
  -- strict thread matches above, loose matches on Subject: below --
2021-01-24 10:36 flix.ptxdist
2018-12-11  7:41 [ptxdist] [PATCH 1/2] rules: polkit: Fix incorrect installation path Michael Olbrich
2018-12-17  8:26 ` [ptxdist] (no subject) Dold, Wolfram
     [not found] <829880836.3299556.1488275043753.ref@mail.yahoo.com>
2017-02-28  9:44 ` fredy zavis
2017-02-28 10:23   ` Juergen Borleis
2015-03-26 13:11 carsten.schlote
2015-04-02 16:22 ` Michael Olbrich
2012-10-15  9:30 Alexander Dahl
2012-10-15 10:15 ` Alexander Dahl
2012-04-26 19:41 Ali Beddah
     [not found] <WC20111103170332.35000F@rsi-elektrotechnik.dedd a simple QML demo application [V2]>
2011-11-04  7:48 ` Josef Holzmayr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1E9AED858BEB204B9DE4F807C7ED0EF617CE151F@EMSRVWIN2934.apps.edc.thyssenkrupp.com \
    --to=christoph.ruediger@thyssenkrupp.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox