Nikita Karetnikov <nik...@karetnikov.org> skribis: >> Can you run ‘file’ on libgcc.a (or one of the .o files it contains)? >> Can you check in the glibc log whether a -mabi flag is passed? > > Oh, I forgot to add the -K option. There are no logs.
-K has nothing to do with logs. :-) Logs are always kept, under /nix/var/log/nix/drvs by default (the directory and file name correspond to the .drv name.) >> You may need to explicitly add -mabi=64 for glibc. It should be >> possible to do it with something like: > >> #:configure-flags '("CFLAGS=-mabi=64 -g -O2") > > Which 'glibc' should be used? The cross one. > I tried to use > > ((#:configure-flags flags) > `(cons ,(string-append "CFLAGS=-mabi=64 -g -O2 " "--host=" target) > ,flags)) > > in 'cross-libc' ('cross-base.scm'), but it failed: > > checking for suffix of object files... configure: error: in > `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-3/build': > configure: error: cannot compute suffix of object files: cannot compile Can you check what config.log has to say? > I reread the quasiquote-related part of the manual, but I still fail to > understand how to add 'CFLAGS' properly. You did it right. :-) Ludo’.