Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] glibc and unknown architecture

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Thomas Orgis <thomas-forum AT orgis.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] glibc and unknown architecture
  • Date: Fri, 23 Jun 2006 15:26:52 +0200

Hi folks!

I've changed my glibc BUILD file trivially to support building on my Alpha
box and think I should let one change be discussed before submitting.
The part that needs change is just the if tree for setting GLIBC_ARCH (and
some special per-arch precautions), without what the build will fail let
alone because there are asm linux headers missing without it.

The current BUILD does:

persistent_add GLIBC_ARCH &&
if "have known arch 1"; then
...
elif "have known arch 2"; then
...
fi

I add one elif for alpha and - that's the part I wanna discuss - an else at
the end that makes the build fail if reached.
I understand that the build must fail if GLIBC_ARCH was not set according to
a known architecture and think that it is a good thing to point that out
before it occurs.
But there may be a reason for this else not being around in the first place,
so I ask now if my addition is really a good thing.

That's the diff:

diff --git a/libs/glibc/BUILD b/libs/glibc/BUILD
index fc6c555..54b383c 100755
--- a/libs/glibc/BUILD
+++ b/libs/glibc/BUILD
@@ -89,7 +89,18 @@ elif [[ ${SMGL_COMPAT_ARCHS[0]} == 32 &&
sedit "s:CPPFLAGS += -DHAVE_INITFINI:CPPFLAGS += -DHAVE_INITFINI -fno-pie
-fno-PIE:" csu/Makefile
export CFLAGS="${CFLAGS/-fcall-used-g7/}"
export CFLAGS="$CFLAGS -fcall-used-g6"
-fi &&
+elif [[ ${SMGL_COMPAT_ARCHS[1]} == alpha ]]; then
+ # This is a first attempt to get alpha going, being paranoid about any
CFLAGS,
+ # not without reason: -Os/-O breaks compile in strange ways:
+ # either an elf/ld.so that segfaults (build failing at sunrpc) or
+ # internal compiler error(s) in intl/
+ # glibc knows itself what flags to choose
+ export CFLAGS="" &&
+ GLIBC_ARCH=alpha
+else
+ message "Glibc spell doesn't know your architecture!" &&
+ false
+fi &&

# set the asm headers to point to the correct architecture
cd $GLIBC_HEADERS_DIR/include &&


PS: I would be happy if the archspecs for alpha in bug #12715 found their way
into smgl-archspecs some time...


Alrighty then,

Thomas.

Attachment: pgpndlDd_tTm7.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page