Hello,

I am writing a Makefile to build glibc in Chapter 10 of the CLFS guide.  I
am trying to setup something like the following:

ARCH       = `cut -d- -f1 <<< ${MACHTYPE}`
CONFIG_ENV = CFLAGS="-march=$(ARCH) -mtune=generic -g -O2"

When I am at the shell prompt and run this command, echo $MACHTYPE, the
result is i686-redhat-linux-gnu.  When I run the Makefile to echo $(ARCH), I
receive this error:

echo `cut -d- -f1 <<< `
/bin/sh: command substitution: line 0: syntax error near unexpected token
`newline'
/bin/sh: command substitution: line 0: `cut -d- -f1 <<< '

I used a similar style way of defining ARCH when I built glibc for the
cross-tools, however in that case it was not MACHTYPE that was referenced,
but instead the CLFS_TARGET environment variable.  How can I get this latest
Makefile to "see" MACHTYPE?  I realize that MACHTYPE is not an environment
variable.  Is there a work around (other than hard-coding)?

Thank you,

Dave
_______________________________________________
Clfs-support mailing list
[email protected]
http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support

Reply via email to