building the toolchain
ftp://ftp.cygnus.com/private/intel/
Contains the sources for the ia64 toolchain (gcc, gas, etc) Note that www.cygnus.com has been swallowed up by redhat.com. Will the ftp site disappear in the near future?
I've been trying to build and use these tools. I believe I am missing some step along the way. I'm starting with the cross compiler and attempting to build a new kernel. Here's what I've done:
rm -rf patches src local build
tar xzf patches.tgz
tar xzf src.tgz
patch -d src/gas/config/ < patches/patch.001
patch -d src/gcc/config/ia64/ < patches/patch.002 patch -d src/gcc/config/ia64/ < patches/patch.003 patch -d src/gcc/config/ia64/ < patches/patch.004 patch -d src/libgloss/ia64/ < patches/patch.005 patch -d src/gcc/config/ia64/ < patches/patch.006 patch -d src/ < patches/patch.007
patch -d src/gcc/config/ia64/ < patches/patch.008 patch -d src/opcodes/ < patches/patch.009
mkdir install
prefix=pwd/install
mkdir build
cd build
../src/configure --prefix=$prefix --target=ia64-cygnus-linux make
PS: I'll be hanging on #[email protected] if anyone wants to chat there.
Signature · 3 lines
Tim Riker - http://rikers.org/ - short SIGs! <g> All I need to know I could have learned in Kindergarten ... if I'd just been paying attention.
Quoted 3 lines · Tim Riker
I've been trying to build and use these tools. I believe I am missing some step along the way. I'm starting with the cross compiler and attempting to build a new kernel. Here's what I've done:
I have tried building the native cpmpiler with a cross compiler but I pretty much gave up. There might be some magic options for configure but I haven't figured them out.
I have build a native compiler with the September release of the compiler. You can grab the native compiler on bunyip in ~jes/usr_local-110100.tar.gz.
Uros
--
Uros Prestor
[email protected]
I managed to get the IA-64 2-16-2000 toolchain built using egcs-2.91.66 from Red Hat 6.1 on an IA32 platform.
The only trouble I had was with 'make install prefix=/usr/local/ia64/' command, where the Makefile in build/itcl/iwidgets3.0.0/unix needed to be fixed a bit, to point to the TCL and TK directories within the top-level src directory. Here's my patch (of course, it'll have to be fixed to show your own src directory). Without the patch, 'make install' failed trying to execute mkinstalldirs under the itcl directory.
What I haven't yet seen is a glibc release (with include files) that lets you build even simple IA64 apps. With no stdio.h anywhere on the Trillian 2-2-2000 CD, one can't compile the simplest hello world app, even though the compiler looks like it would do it if glibc were present.
Thanks,
Matt Domsch
Dell Enterprise Systems Group
Linux Development Team
diff -burN build/itcl/iwidgets3.0.0/unix/Makefile~ build/itcl/iwidgets3.0.0/unix/Makefile
itcl/iwidgets3.0.0/unix/Makefile Sun Feb 20 21:16:12 2000 renamed from itcl/iwidgets3.0.0/unix/Makefile~ Sun Feb 20 18:05:16 2000 +9 -5
@@ -77,25 +77,29 @@ TCL_LIB_DIR = /usr/lib # Directory containing Tcl source code (for library used during test): -TCL_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/tcl8.0.5 +#TCL_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/tcl8.0.5 +TCL_SRC_DIR = /home/mdomsch/gnupro/src/tcl # Tk libraries can be found here: TK_LIB_DIR = /usr/lib # Directory containing Tk source code (for library used during test): -TK_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/tk8.0.5 +#TK_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/tk8.0.5 +TK_SRC_DIR = /home/mdomsch/gnupro/src/tk # Itcl libraries can be found here: ITCL_LIB_DIR = /usr/lib # Directory containing Itcl source code (for library used during test): -ITCL_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/itcl3.0.1/itcl +#ITCL_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/itcl3.0.1/itcl +ITCL_SRC_DIR = /home/mdomsch/gnupro/src/itcl # Itk libraries can be found here: ITK_LIB_DIR = /usr/lib # Directory containing Itk source code (for library used during test): -ITK_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/itcl3.0.1/itk +#ITK_SRC_DIR = /usr/src/bs/BUILD/tcltk-8.0.5/itcl3.0.1/itk +ITK_SRC_DIR = /home/mdomsch/gnupro/src/itk # [incr Tk] build directory containing the itkwish binary for 'make test' ITK_BIN_DIR = ../../itk/unix
@@ -113,7 +117,7 @@ INSTALL = /usr/bin/install -c INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) -m 644 -MKINSTALLDIRS = $(ITCL_SRC_DIR)/../config/mkinstalldirs +MKINSTALLDIRS = $(ITCL_SRC_DIR)/config/mkinstalldirs RANLIB = ranlib TOP_DIR = /home/mdomsch/gnupro/src/itcl/iwidgets3.0.0 GENERIC_DIR = $(TOP_DIR)/generic
-----Original Message-----
From: Uros Prestor [mailto:[email protected]]
Sent: Sunday, February 20, 2000 2:18 PM
To: Tim Riker
Cc: [email protected]
Subject: Re: [Linux-ia64] building the toolchain
Quoted 3 lines · Tim Riker
I've been trying to build and use these tools. I believe I am missing some step along the way. I'm starting with the cross compiler and attempting to build a new kernel. Here's what I've done:
I have tried building the native cpmpiler with a cross compiler but I pretty much gave up. There might be some magic options for configure but I haven't figured them out.
I have build a native compiler with the September release of the compiler. You can grab the native compiler on bunyip in ~jes/usr_local-110100.tar.gz.
Uros
--
Uros Prestor
[email protected]
_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Will the ftp site disappear in the near future?
No.
I've been trying to build and use these tools. I believe I am missing some step along the way. I'm starting with the cross compiler and attempting to build a new kernel. Here's what I've done:
It looks like a good start. Unfortunately, since you did not report any actual error, all I can do is guess at what might be the problem. Bug reports are much more useful if they actually contain info about the bug.
My guess is that the build failed while trying to compile gcc's libgcc.a library because stdio.h was missing.
To fix this problem, you want to use the additional configure options
--with-headers=<path> --with-libs=<path>
where <path> is a directory name containing ia64-linux header files and libraries respectively. If you have an ia64-linux machine, you can just copy the /usr/include and /lib directories to someplace on the machine where you are building the cross compiler, and then point the options at the copied directories.
Unfortunately, I just took a look at the OS CD-rom from LinuxWorld, and discovered that /usr/include and /lib are empty. This means there is no easy way to build a working toolchain. I don't know why these weren't included in the public release.
The OS CD-rom does contain a copy of the glibc sources in /usr/src. So you can still do a build, but you essentially have to build gcc and glibc at the same time. I've never done that. I'm a novice when it comes to glibc builds, so I can't guarantee that I can figure out how to do this.
Jim
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jim" = Jim Wilson <[email protected]> writes:
Jim> The OS CD-rom does contain a copy of the glibc sources in Jim> /usr/src. So you can still do a build, but you essentially have Jim> to build gcc and glibc at the same time. I've never done that. Jim> I'm a novice when it comes to glibc builds, so I can't guarantee Jim> that I can figure out how to do this.
Hmmm bummer
Well it shouldn't be too hard actually.
First trick is to build gcc for cross compiling like if you were simply compiling the kernel. Then build glibc with something like this:
mkdir glibc-build
cd glibc-build
../glibc/configure --with-headers=/usr/src/linux-ia64/include --disable-profile --disable-sanity-checks --disable-cvs --enable-add-ons=crypt --prefix=<glibc-hack-directory> --host=ia64-gnu-linux --build=i386-linux make install
Then afterwards one should be able to configure gcc to pick up the glibc headers and library.
Jes
The only trouble I had was with 'make install prefix=/usr/local/ia64/' command, where the Makefile in build/itcl/iwidgets3.0.0/unix needed to be fixed a bit, to point to the TCL and TK directories within the top-level src directory.
The recommended way to build the toolchain is to specify prefix when configuring, not when installing. E.g., something like
configure --prefix=/usr/local/ia64 ... make all make install
If you give the prefix at configure time, then programs with builtin pathnames will have the correct pathnames. If you give the prefix at install time, some programs may fail to work, unless you set an environment variable or use a command line option to override the default pathnames.
If you did not specify a prefix to configure, this may explain why itcl/iwidgets3.0.0/unix got confused. configure thought you were building something for /usr/local by default, it noticed that there was already tcl/tk stuff in /usr/local, and tried to use it. This stuff is obviously wrong for a cross compiler though. And it is also wrong because you ended up with pathnames pointing to someone else's tcl/tk source tree.
What I haven't yet seen is a glibc release (with include files) that lets you build even simple IA64 apps.
This is unfortunate.
However, there are glibc sources in /usr/src on the OS CD-rom. If you are feeling adventurous, you could try to compile them yourself. I haven't tried this myself. I'll probably wait until the linux distributors have something ready.
Jim
One should keep in mind that source RPMs tipically do both. They use one prefix when building so that all binaries get the right paths as Jim mentioned. An then they install with a different prefix so that the files get installed into a prefixed virtual tree that can be packaged. When the package is unpacked the files are unpacked into the correct locations that the binaries are expecting.
build prefix might be /usr and install prefix /tmp/package-version/usr and so on.
Quoted 39 lines · Jim Wilson
The only trouble I had was with 'make install prefix=/usr/local/ia64/' command, where the
Makefilein build/itcl/iwidgets3.0.0/unix needed to be fixed a bit, to point to the TCL and TK directories within the top-level src directory.The recommended way to build the toolchain is to specify prefix when configuring, not when installing. E.g., something like
configure --prefix=/usr/local/ia64 ... make all make installIf you give the prefix at configure time, then programs with builtin pathnames will have the correct pathnames. If you give the prefix at install time, some programs may fail to work, unless you set an environment variable or use a command line option to override the default pathnames.
If you did not specify a prefix to configure, this may explain why itcl/iwidgets3.0.0/unix got confused. configure thought you were building something for
/usr/localby default, it noticed that there was already tcl/tk stuff in/usr/local, and tried to use it. This stuff is obviously wrong for a cross compiler though. And it is also wrong because you ended up with pathnames pointing to someone else's tcl/tk source tree.What I haven't yet seen is a glibc release (with include files) that lets you build even simple IA64 apps.
This is unfortunate.
However, there are glibc sources in
/usr/srcon the OS CD-rom. If you are feeling adventurous, you could try to compile them yourself. I haven't tried this myself. I'll probably wait until the linux distributors have something ready.Jim
_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Signature · 3 lines
Tim Riker - http://rikers.org/ - short SIGs! <g> All I need to know I could have learned in Kindergarten ... if I'd just been paying attention.