Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370063 - sys-devel/crossdev: settings masked via arch profiles are not considered with cross-compilers
Summary: sys-devel/crossdev: settings masked via arch profiles are not considered with...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Gentoo Crossdev team
URL:
Whiteboard:
Keywords:
: 525910 604668 609032 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-04 20:30 UTC by Maciej S. Szmigiero
Modified: 2019-10-30 22:31 UTC (History)
17 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej S. Szmigiero 2011-06-04 20:30:35 UTC
crossdev for MIPS fails on gcc stage1 when hardened is in USE flags (on host)




Reproducible: Always

Steps to Reproduce:
1. Have hardened in host USE flags
2. crossdev -t mips-softfloat-linux-gnu
3. Wait until it hits gcc-stage1

Actual Results:  
configure: error: *** --enable-esp is not supported on this mips-softfloat-linux-gnu target.



Expected Results:  
GCC should build.

When I blacklist hardened USE flag for GCC in crossdev script everything builds successfully.

Patch:

--- /usr/bin/crossdev.old  2011-06-04 21:16:57.272280477 +0200
+++ /usr/bin/crossdev   2011-06-04 21:18:36.631893358 +0200
@@ -173,6 +173,9 @@
                      KCAT="dev-util"; KPKG="w32api";
                      LCAT="dev-util"; LPKG="mingw-runtime";;

+               mips*) GUSE="-hardened" # doesn't work
+                     ;;
+
                msp430)
                      STAGE_DEFAULT=${STAGE_BINUTILS};;
Comment 1 SpanKY gentoo-dev 2011-06-07 21:30:29 UTC
i'm not copying all of the misc profiles into crossdev
Comment 2 SpanKY gentoo-dev 2014-10-31 16:06:41 UTC
*** Bug 525910 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2014-10-31 18:43:57 UTC
*** Bug 525910 has been marked as a duplicate of this bug. ***
Comment 4 Anthony Basile gentoo-dev 2014-11-02 21:40:58 UTC
(In reply to Maciej Szmigiero from comment #0)
> crossdev for MIPS fails on gcc stage1 when hardened is in USE flags (on host)
> 
> 
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Have hardened in host USE flags
> 2. crossdev -t mips-softfloat-linux-gnu
> 3. Wait until it hits gcc-stage1
> 
> Actual Results:  
> configure: error: *** --enable-esp is not supported on this
> mips-softfloat-linux-gnu target.
> 
> 
> 
> Expected Results:  
> GCC should build.
> 
> When I blacklist hardened USE flag for GCC in crossdev script everything
> builds successfully.
> 
> Patch:
> 
> --- /usr/bin/crossdev.old  2011-06-04 21:16:57.272280477 +0200
> +++ /usr/bin/crossdev   2011-06-04 21:18:36.631893358 +0200
> @@ -173,6 +173,9 @@
>                       KCAT="dev-util"; KPKG="w32api";
>                       LCAT="dev-util"; LPKG="mingw-runtime";;
> 
> +               mips*) GUSE="-hardened" # doesn't work
> +                     ;;
> +
>                 msp430)
>                       STAGE_DEFAULT=${STAGE_BINUTILS};;


Actually this is not true.  We are supporting hardened on mips for gcc-4.8 and above.  I've been using it for several years.  So you patch would be a problem for people wanting hardened mips, like me :)
Comment 5 Maciej S. Szmigiero 2014-11-04 00:54:34 UTC
(In reply to Anthony Basile from comment #4)
> (In reply to Maciej Szmigiero from comment #0)
> > crossdev for MIPS fails on gcc stage1 when hardened is in USE flags (on host)
(..)
> Actually this is not true.  We are supporting hardened on mips for gcc-4.8
> and above.  I've been using it for several years.  So you patch would be a
> problem for people wanting hardened mips, like me :)

Might be true now - the above was written 3+ years ago, two major gcc version later it may work out of the box :)
Comment 6 thunder367 2015-01-17 19:49:33 UTC
This bug may be fixed for mips-linux-uclibc architecture??
Comment 7 Johannes Buchner 2015-05-30 12:54:55 UTC
In the bug marked as duplicate, I did not use hardened. 
I posted all my log files there, Bug 525910 https://bugs.gentoo.org/show_bug.cgi?id=525910
I don't fully understand the error.
Comment 8 SpanKY gentoo-dev 2015-05-30 18:13:07 UTC
(In reply to Johannes Buchner from comment #7)

if you review the bug summary, this is not specific to hardened or any target

you can workaround it locally with something like:
crossdev --genv 'USE="-sanitize"' ...
Comment 9 Alexander Tsoy 2015-10-31 11:44:31 UTC
How about bare-metal targets (eg avr) for which we doesn't have profiles?
Comment 10 SpanKY gentoo-dev 2017-01-18 10:11:41 UTC
*** Bug 604668 has been marked as a duplicate of this bug. ***
Comment 11 Martin von Gagern 2017-01-18 13:10:08 UTC
How about you create a package "crossdev-masks" which generates a list of “crossdev-‹target›/‹package› -‹keyword›” settings and installs this list to /etc/portage/package.use/crossdev or something like that?

You may be able to collect some of the data for this list from the official profiles, either during install or when building a release of this package. The latter would make things more reproducible, while the former might be able to work with overlays, too. You could also manually collect keywords which are known to fail on systems that have no profile, e.g. in response to a bug report. You could have the generation process substitute alternate category names for targets that may be identified by different names.

I think you should make crossdev depend on this package, so that people get the list without manual action. If someone starts editing the list, config protection would kick in and require a manual merge upon next upgrade, which I'd consider appropriate. You might also make the list generation part of the crossdev package itself, but that would mean updating the whole package whenever the list of masked flags changes. Not sure how often that would be, so decide for yourself.

You could also have crossdev interact with this list generation. Whenever a new target gets installed, suitable entries would get generated and appended to the file. That would allow e.g. matching the target against wildcards, so you could e.g. mask based on OS no matter the ARCH. The problem here would be getting rid of settings again. When removing a target, you can easily clean all settings for that, but what happens if the profile for some target changes, to now allow a flag that used to be forbidden? Then you should revbump the package, and the installation should generate a new list based on the installed cross compilers, to be presented to the user via regular config file handling tools.
Comment 12 SpanKY gentoo-dev 2017-03-13 04:17:19 UTC
*** Bug 609032 has been marked as a duplicate of this bug. ***
Comment 14 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-09-10 16:18:12 UTC
Mark spam comment private.
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-30 22:31:34 UTC
crossdev got a bunch of filters recently. If that still happens please file a new bug and we'll sort out filters.