2

My host:

  lfs@sam:/mnt/lfs/sources/glibc-build$ uname -m
  x86_64
  lfs@sam:/mnt/lfs/sources/glibc-build$ 

In lfs(LFS-BOOK-6.8-HTML/chapter05/glibc.html) It says

  case `uname -m` in
    i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
  esac

What I should change on 'i?86'?

And should I change 'i486'?

Thank you~

2

That segment is for if you were building a script to compile glibc automatically in order to run it on this system. The "i?86" is a pattern; if the outut of uname -m matches it, it will run the following commands until it gets to ;;.

You probably don't need it; it was specifically meant to figure out if your architecture type was i386 since glibc doesn't support it anymore.

If you're building it in order to run it on a different system that is not x86_64 (or to run it on this system, but using only 32-bit instructions), then you want to force compiling for i486. You can get rid the case structure completely by converting

case `uname -m` in
  i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
esac

to

echo "CFLAGS += -march=i486 -mtune=native" > configparms

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.