[sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-12-08 Thread Zack Weinberg
Follow-up Comment #2, sr#110846 (group autoconf):

Note that cross compilation mode _can_ be forced on, today, with e.g. 


./configure --host=aarch64-unknown-linux-gnu cross_compiling=yes




___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




Re: [sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-12-07 Thread Nick Bowler

On 2023-12-07 21:28, Zack Weinberg wrote:

Follow-up Comment #1, sr#110846 (group autoconf):

We regret the delay in responding to this bug report.

I believe this is the same as #110348.  The proposal there would make it so
you could force a configure script into cross-compilation mode, even when the
build and host triples are the same and the cross-compiled executables can run
on the build system, by specifying --host and *not* --build.  Would that work
for you?  (Please reply in #110348, I'm going to close this report.)

This will not happen for 2.72 but hopefully will for the release after that.


You can already force cross-compilation mode today by running

  ./configure cross_compiling=yes

I think it would be better to simply document this more clearly. 
Changing the behaviour of --host (without --build) to force cross 
compilation mode seems ill-advised.  As I recall, this was tried before 
some years back and there were complaints by people cross-building with 
mingw on GNU/Linux build systems, who actually wanted the runtime tests 
to be done.


I think the current wording in the manual (which de-emphasized the 
recommendation to always specify --build and --host together) came as a 
result of those complaints, and it explicitly mentions the mingw use case.


Cheers,
  Nick



[sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-12-07 Thread Zack Weinberg
Follow-up Comment #1, sr#110846 (group autoconf):

We regret the delay in responding to this bug report.

I believe this is the same as #110348.  The proposal there would make it so
you could force a configure script into cross-compilation mode, even when the
build and host triples are the same and the cross-compiled executables can run
on the build system, by specifying --host and *not* --build.  Would that work
for you?  (Please reply in #110348, I'm going to close this report.)

This will not happen for 2.72 but hopefully will for the release after that.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




Re: [sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-03-01 Thread Lang Daniel
> On 2023-03-01, anonymous  wrote:
>> This might be the desired use case, but when cross compiling with
>> systems like buildroot one might have the same architecture on
>> --build and --host.
>>
>> Example: Compile on Apple silicon (aarch64-unknown-linux-gnu) for a Cortex
>> A75 based system (aarch64-unknown-linux-gnu). Cross compiling isn't
>> automatically detected.
>
> By setting --host and --build to the same value, this explicitly forces
> non-cross-compilation mode in configure.
> 
> If you specify --host without also specifying --build, then configure will
> run the auto-detection which I expect will work properly for you.

Looking into configure setting --host without --build will trigger a test
where an executable is run to determine whether or not cross compiling is
happening. Which in this case may or may not fail.

The manual states:
"Therefore, whenever you specify --host, be sure to specify --build too."

> 
> Probably the "vendor" field of the host triplet should have been set to
> something different for these different systems, but I digress...

Buildroot adds itself as the vendor (aarch64-buildroot-linux-gnu) but
libgpg-error uses the host triplet to lookup a matching syscfg. Therefore
the it has to be changed to aarch64-unknown-linux-gnu.

> 
>> And there seems to be no way to force it if we know that we are cross
>> compiling.
>
> Nevertheless, you can always force cross compilation mode by explicitly
> setting cross_compiling=yes, for example:
> 
>   % ./configure cross_compiling=yes

Thanks for the tip. I tried --cross_compiling=yes which wasn't registered
leading me to believe that there is no way to force it.

> 
> Hope that helps,
>   Nick

Regards
Daniel


Re: [sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-03-01 Thread Nick Bowler
On 2023-03-01, anonymous  wrote:
> This might be the desired use case, but when cross compiling with
> systems like buildroot one might have the same architecture on
> --build and --host.
>
> Example: Compile on Apple silicon (aarch64-unknown-linux-gnu) for a Cortex
> A75 based system (aarch64-unknown-linux-gnu). Cross compiling isn't
> automatically detected.

By setting --host and --build to the same value, this explicitly forces
non-cross-compilation mode in configure.

If you specify --host without also specifying --build, then configure will
run the auto-detection which I expect will work properly for you.

Probably the "vendor" field of the host triplet should have been set to
something different for these different systems, but I digress...

> And there seems to be no way to force it if we know that we are cross
> compiling.

Nevertheless, you can always force cross compilation mode by explicitly
setting cross_compiling=yes, for example:

  % ./configure cross_compiling=yes

Hope that helps,
  Nick



[sr #110846] cross-compilation is not entered when build_alias and host_alias are the same

2023-03-01 Thread anonymous
URL:
  

 Summary: cross-compilation is not entered when build_alias
and host_alias are the same
   Group: Autoconf
   Submitter: None
   Submitted: Wed 01 Mar 2023 02:18:17 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: d.l...@abatec.at
 Open/Closed: Open
 Discussion Lock: Any
Operating System: GNU/Linux


___

Follow-up Comments:


---
Date: Wed 01 Mar 2023 02:18:17 PM UTC By: Anonymous
This might be the desired use case, but when cross compiling with systems like
buildroot one might have the same architecture on --build and --host.

Example: Compile on Apple silicon (aarch64-unknown-linux-gnu) for a Cortex A75
based system (aarch64-unknown-linux-gnu). Cross compiling isn't automatically
detected.
And there seems to be no way to force it if we know that we are cross
compiling.

See:
http://autobuild.buildroot.net/results/6d4/6d4bc520c12313508d0fadee11d5b88c35a3cba9/build-end.log







___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/