Skip to content
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

Makefile: Support passing environment variables through make--and use… #610

Closed
wants to merge 2 commits into from
Closed

Makefile: Support passing environment variables through make--and use… #610

wants to merge 2 commits into from

Conversation

daym
Copy link
Collaborator

@daym daym commented Sep 16, 2019

… it to support host compilers that use environment variables CPATH etc. See Issue #609.

Danny Milosavljevic added 2 commits October 2, 2019 16:08
@tlaurion
Copy link
Collaborator

tlaurion commented Dec 15, 2019

Hello @daym
I get the following on fedora-30:

make -C "/home/user/heads/build/busybox-1.28.0" CC=/home/user/heads/install/bin/musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__  CPP=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-cpp CXXCPP=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-cpp CC_FOR_BUILD= BUILD_CC= HOSTCC= AR=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ar LD=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-ld STRIP=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-strip NM=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-nm OBJCOPY=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objcopy OBJDUMP=/home/user/heads/build/../crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-objdump PKG_CONFIG_PATH=/home/user/heads/install/lib/pkgconfig PKG_CONFIG_SYSROOT_DIR=/home/user/heads/install    
make[1]: Entering directory '/home/user/heads/build/busybox-1.28.0'
rm -f .kernelrelease
echo 1.28.0 > .kernelrelease
/home/user/heads/build/busybox-1.28.0/scripts/gen_build_files.sh /home/user/heads/build/busybox-1.28.0 /home/user/heads/build/busybox-1.28.0
make -f scripts/Makefile.build obj=scripts/basic
   -Wp,-MD,scripts/basic/.fixdep.d         -o scripts/basic/fixdep scripts/basic/fixdep.c  
/bin/sh: -Wp,-MD,scripts/basic/.fixdep.d: No such file or directory
make[2]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 127
make[1]: *** [Makefile:357: scripts_basic] Error 2
make[1]: Leaving directory '/home/user/heads/build/busybox-1.28.0'
make: *** [Makefile:384: /home/user/heads/build/busybox-1.28.0/.build] Error 1

make sure to:

cd heads
make BOARD=YourBoard real.clean
rm -rf crossgcc
make BOARD=YourBoard

And rebase on tope

@tlaurion
Copy link
Collaborator

@daym ping!

@tlaurion
Copy link
Collaborator

@osreserch: issue linked to this might expose roots of reproducibility issues?

@daym
Copy link
Collaborator Author

daym commented May 2, 2020

@daym ping!

I'd like to finish this, but I can't right now--because musl-cross in Guix doesn't work anymore.

I'm trying to update it now. The newest version of musl-cross errors out with the following (in gcc-5.3.0 in build2):

ctype_members.cc:50:17: error: cannot convert 'const short unsigned int*' to 'co
nst mask* {aka const unsigned int*}' in assignment
  this->_M_table = this->_M_c_locale_ctype->__ctype_b;

that's in ctype_byname::ctype_byname; commenting out now.

I needed this stuff to actually work for a client so I compiled heads without patches in RHEL for the time being.

I can only say that these environment variables are absolutely required in Guix (and are a GCC upstream feature)--and if you don't unset them in places where musl-cross is used (but have to keep them where host gcc is used), that's not going to end well.

@daym
Copy link
Collaborator Author

daym commented May 2, 2020

Rebased in new pull request #710.

@daym daym closed this May 2, 2020
@daym
Copy link
Collaborator Author

daym commented May 24, 2020

(I didn't fix the ctype issue in musl-cross - I just commented that part out because we don't use it anyway. Works fine)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants