All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach via buildroot <buildroot@buildroot.org>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Thomas Perrot <thomas.perrot@bootlin.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2] package/imx-cst: new package
Date: Sun, 24 Apr 2022 14:19:48 +0300	[thread overview]
Message-ID: <875ymy3e9k.fsf@tarshish> (raw)
In-Reply-To: <20220422121639.5118cd38@windsurf>

Hi Thomas,

On Fri, Apr 22 2022, Thomas Petazzoni wrote:
> On Fri, 22 Apr 2022 12:09:00 +0200
> Thomas Perrot <thomas.perrot@bootlin.com> wrote:
>
>> > It looks like the only difference between 64 and 32 is in openssl
>> > build
>> > rule, and for x86 (host) targets only. We don't use this openssl rule
>> > since we build host-openssl with our own rules. So maybe we can just
>> > arbitrarily choose hard coded 'linux64'. It seems that
>> > debian/Makefile
>> > does that.  
>> 
>> Thanks for your review, I’m submitting a v3 with the OSTYPE variable
>> hardcoded to linux64.
>
> No, please don't. We're doing the build like this:
>
> build:
>         $(MAKE) -C $(CST_CODE_PATH)/obj.$(OSTYPE) build
>
> And code/cst/code/obj.linux32/Makefile contains:
>
> COPTIONS += -m32
> LDOPTIONS += -m32
>
> while code/cst/code/obj.linux64/Makefile contains
>
> COPTIONS += -m64
> LDOPTIONS += -m64
>
> And I can definitely see the -m64 being added in the compiler flags
> when doing a build on a x86-64 host (run the build with VERBOSE=1, you
> will see).
>
> So if you use linux64 unconditionally, the CST binaries will be built
> with -m64, even on 32-bit host machines => bad.

You are right. I didn't notice these -m32/-m64 parameters.

But that raises another problem. -m32/-m64 are platform specific
options. A quick look at the GCC manual indicates that x86, Sparc, and
PowerPC targets support these options. S390 supports -m64, but not
-m32. ARM/ARM64 support none. So this package should depend on host
architectures that support -m32/-m64.

Alternatively we can just patch out the whole 32/64 thing. This is most
likely a remnant of previous versions that shipped binary .a files.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-04-24 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  8:39 [Buildroot] [PATCH v2 1/2] package/byacc: new package Thomas Perrot via buildroot
2022-04-20  8:39 ` [Buildroot] [PATCH 2/2] package/imx-cst: " Thomas Perrot via buildroot
2022-04-20 17:28   ` Baruch Siach via buildroot
2022-04-22 10:09     ` Thomas Perrot via buildroot
2022-04-22 10:16       ` Thomas Petazzoni via buildroot
2022-04-24 11:19         ` Baruch Siach via buildroot [this message]
2022-08-22 19:56 ` [Buildroot] [PATCH v2 1/2] package/byacc: " Yann E. MORIN

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=875ymy3e9k.fsf@tarshish \
    --to=buildroot@buildroot.org \
    --cc=baruch@tkos.co.il \
    --cc=thomas.perrot@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.