-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yocto requires separate epiphany and host builds #229
Comments
You can set $ cd pal
$ ./configure \
--enable-device-epiphany \
CFLAGS="-O2" \
LDFLAGS_FOR_EPIPHANY="..." \
CFLAGS_FOR_EPIPHANY="-Os" Alternatively, you can rerun the device configure after host configure. Example: $ cd pal
$ ./configure --enable-device-epiphany
$ cd device/epiphany
$ head config.log
$ ../../configure --host=epiphany-elf --prefix=foo CFLAGS="-Os"
$ cd ../..
$ make
Out of tree build is supported by autotools. Piece of cake: $ mkdir build
$ cd build
$ path/to/pal/source/configure --my-flags
$ make |
So my plan is to have two separate build folders. First will be configured for just the epiphany build and the second will be configured just for the arm host build. In the first folder when I run make only the epiphany code will be built. In the second folder when I run make only the host code will be built. These two separate builds can then be packaged separately and used on the target. At the moment as soon as I configure for epiphany this also configures the host build. Building will then produce epiphany and arm code. The yocto environment overrides a lot of the things set in configure using environment variables. Mixed builds tend not to work so well because the overrides for epiphany conflict with the overrides needed for the arm build. It would be possible to remove the yocto environment overrides, however this goes against the yocto way of doing things and might end up with a significantly more complex build environment. Peter |
Hi Peter, Which environment variables? Environment variables (e.g. CFLAGS, LDFLAGS) are only considered at configure time and are then ignored by make, this works: $ CFLAGS="-invalid-ignored-option" make I still don't see why you need to split the build into two. The top level pal build will take care of the device build. You don't create a separate build for the epiphany C runtime when building the GCC compiler, that's taken care of by the GCC build. This is how it should work. The Yocto build system probably already does most of the steps below: -1. Create a build directory
-2. configure cross build for arm w/ epiphany device enabled and some custom flags (concept example)
-3. -4. install to staging area
-5. Then split the output into two packages, pal and pal-epiphany Everyting in /path/to/staging/usr/epiphany-elf goes into pal-epiphany, everything else into pal You might also want to add a -dev package for include files Does this make any sense? Ola |
Thank you for your detailed response. I will spend some time this week looking at the details and trying some things out. Here are a few quick answers: Which environment variables You don't create a separate build for the epiphany C runtime when building the GCC compiler, that's taken care of by the GCC build Then split the output into two packages |
@olajep whilst looking into the yocto build environment I have found that the build process works better if there are separate configure scripts for arm and epiphany builds. This is because the configure script tends to have many things overridden with environment variables when building with yocto. These overrides should be different for arm and epiphany.
Have you an objection to splitting the configure script into three such that the top level configure script will build both, but the next level down will build either arm code or epiphany code depending on the configure script used?
I envisage a top level configure with two folders one for arm and one for devices/epiphany where the second set of configure scripts will be located.
In addition yocto requires that the build object can be created in a separate folder tree. At the moment the source and build tree is the same.
The reason for doing this is that then we can create a meta-pal layer that could be used for multiple processor types in the yocto build environment.
Peter.
The text was updated successfully, but these errors were encountered: