Mailing List Archive

[PATCH] Move ARCH and ELIBC to local profile
As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
define these in make.conf.
Move these to etc/portage/profile/make.defaults which is part
of the profile.
---

This is an idea I am contemplating. How does crossdev
like to have profile data in etc/portage/profile/make.default?

Also, the use of __ARCH__ and ${ARCH} in make.conf is inconsistent,
switched to ${ARCH} but I am unsue if this is the way to go.

Oh, this is not tested(yet)!

wrappers/emerge-wrapper | 4 ++++
wrappers/etc/portage/make.conf | 5 +----
wrappers/etc/portage/profile/make.defaults | 2 ++
3 files changed, 7 insertions(+), 4 deletions(-)
create mode 100644 wrappers/etc/portage/profile/make.defaults

diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index 7bcbcf0..df8b39a 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -68,6 +68,10 @@ cross_wrap_etc()
egrep '/(linux-headers|glibc|musl|newlib|uclibc)-' | \
sed "s:^[^/]*:sys-libs:" \
> profile/package.provided
+ sed -i \
+ -e "s:__LIBC__:${LIBC}:g" \
+ -e "s:__ARCH__:${ARCH}:g" \
+ profile/make.defaults

return 0
}
diff --git a/wrappers/etc/portage/make.conf b/wrappers/etc/portage/make.conf
index 65214dc..cec2ebb 100644
--- a/wrappers/etc/portage/make.conf
+++ b/wrappers/etc/portage/make.conf
@@ -1,12 +1,11 @@
CHOST=__CHOST__
CBUILD=__CBUILD__
-ARCH=__ARCH__

HOSTCC=__CBUILD__-gcc

ROOT=/usr/${CHOST}/

-ACCEPT_KEYWORDS="__ARCH__ ~__ARCH__"
+ACCEPT_KEYWORDS="${ARCH} ~${ARCH}"

USE="${ARCH} -pam"

@@ -18,7 +17,5 @@ FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

-ELIBC="__LIBC__"
-
PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"
diff --git a/wrappers/etc/portage/profile/make.defaults b/wrappers/etc/portage/profile/make.defaults
new file mode 100644
index 0000000..5ad9037
--- /dev/null
+++ b/wrappers/etc/portage/profile/make.defaults
@@ -0,0 +1,2 @@
+ARCH="__ARCH__"
+ELIBC="__LIBC__"
--
1.8.3.2
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
> As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
> define these in make.conf.
> Move these to etc/portage/profile/make.defaults which is part
> of the profile.

i've been thinking we should stop using the embedded profile entirely.
instead, scan profiles.desc and pick the first one there that matches ARCH.
-mike
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
Mike Frysinger <vapier@gentoo.org> wrote on 2014/01/30 20:12:54:

> From: Mike Frysinger <vapier@gentoo.org>
> To: gentoo-embedded@lists.gentoo.org
> Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> Date: 2014/01/30 20:13
> Subject: Re: [gentoo-embedded] [PATCH] Move ARCH and ELIBC to local
profile
>
> On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
> > As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
> > define these in make.conf.
> > Move these to etc/portage/profile/make.defaults which is part
> > of the profile.
>
> i've been thinking we should stop using the embedded profile entirely.
> instead, scan profiles.desc and pick the first one there that matches
ARCH.
> -mike

That would pull in a lot of pkgs into the embedded space, would it not?
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
On 01/30/2014 02:49 PM, Joakim Tjernlund wrote:
> Mike Frysinger <vapier@gentoo.org> wrote on 2014/01/30 20:12:54:
>
>> From: Mike Frysinger <vapier@gentoo.org>
>> To: gentoo-embedded@lists.gentoo.org
>> Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
>> Date: 2014/01/30 20:13
>> Subject: Re: [gentoo-embedded] [PATCH] Move ARCH and ELIBC to local
> profile
>>
>> On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
>>> As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
>>> define these in make.conf.
>>> Move these to etc/portage/profile/make.defaults which is part
>>> of the profile.
>>
>> i've been thinking we should stop using the embedded profile entirely.
>> instead, scan profiles.desc and pick the first one there that matches
> ARCH.
>> -mike
>
> That would pull in a lot of pkgs into the embedded space, would it not?
>
>
I think so. I personally prefer to use the embedded profile and populate
the aforementioned variables in make.defaults. The default profiles have
too many use flags turned on to create small builds.

--
♫Dustin
http://dustin.hatch.name/
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
On Thursday, January 30, 2014 21:49:24 Joakim Tjernlund wrote:
> Mike Frysinger <vapier@gentoo.org> wrote on 2014/01/30 20:12:54:
> > On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
> > > As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
> > > define these in make.conf.
> > > Move these to etc/portage/profile/make.defaults which is part
> > > of the profile.
> >
> > i've been thinking we should stop using the embedded profile entirely.
> > instead, scan profiles.desc and pick the first one there that matches
> > ARCH.
>
> That would pull in a lot of pkgs into the embedded space, would it not?

it would to a degree. i really really don't want crossdev to get into the
business of generating profiles.

the other aspect is that the embedded profile does not import all the arch-
specific details that profiles/arch/$ARCH/ contain (which is why crossdev has
this ARCH hack in the first place). or all the profiles/default/linux/ stuff
(for linux targets).

what CTARGET do you normally use ?
-mike
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
Mike Frysinger <vapier@gentoo.org> wrote on 2014/02/01 08:08:04:

> From: Mike Frysinger <vapier@gentoo.org>
> To: gentoo-embedded@lists.gentoo.org
> Cc: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> Date: 2014/02/01 08:08
> Subject: Re: [gentoo-embedded] [PATCH] Move ARCH and ELIBC to local
profile
>
> On Thursday, January 30, 2014 21:49:24 Joakim Tjernlund wrote:
> > Mike Frysinger <vapier@gentoo.org> wrote on 2014/01/30 20:12:54:
> > > On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
> > > > As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
> > > > define these in make.conf.
> > > > Move these to etc/portage/profile/make.defaults which is part
> > > > of the profile.
> > >
> > > i've been thinking we should stop using the embedded profile
entirely.
> > > instead, scan profiles.desc and pick the first one there that
matches
> > > ARCH.
> >
> > That would pull in a lot of pkgs into the embedded space, would it
not?
>
> it would to a degree. i really really don't want crossdev to get into
the
> business of generating profiles.
>
> the other aspect is that the embedded profile does not import all the
arch-
> specific details that profiles/arch/$ARCH/ contain (which is why
crossdev has
> this ARCH hack in the first place). or all the profiles/default/linux/
stuff
> (for linux targets).
>
> what CTARGET do you normally use ?

Mostly powerpc-xxx-linux-gnu and powerpc-softfloat-linux-gnu
but just started with x86_64-xxx-linux-gnu too.

BTW, while I remember, crossdev creates stuff under
/etc/portage(categories and build env.)
Would be great if this could be redirected to an overlay so one can have
everything
one needs to build the toolchain.

Jocke
Re: [PATCH] Move ARCH and ELIBC to local profile [ In reply to ]
Mike Frysinger <vapier@gentoo.org> wrote on 2014/02/01 08:08:04:
>
> On Thursday, January 30, 2014 21:49:24 Joakim Tjernlund wrote:
> > Mike Frysinger <vapier@gentoo.org> wrote on 2014/01/30 20:12:54:
> > > On Wednesday, January 29, 2014 17:58:46 Joakim Tjernlund wrote:
> > > > As both ARCH and ELIBC are PROFILE_ONLY vars one cannot
> > > > define these in make.conf.
> > > > Move these to etc/portage/profile/make.defaults which is part
> > > > of the profile.
> > >
> > > i've been thinking we should stop using the embedded profile
entirely.
> > > instead, scan profiles.desc and pick the first one there that
matches
> > > ARCH.
> >
> > That would pull in a lot of pkgs into the embedded space, would it
not?
>
> it would to a degree. i really really don't want crossdev to get into
the
> business of generating profiles.
>
> the other aspect is that the embedded profile does not import all the
arch-
> specific details that profiles/arch/$ARCH/ contain (which is why
crossdev has
> this ARCH hack in the first place). or all the profiles/default/linux/
stuff
> (for linux targets).
>
> what CTARGET do you normally use ?

While waiting for how to deal with profiles, could we not fix the error
that is?

Jocke