[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] managed build flexibility: building glibc
|
Hi all,
I would like to describe my experience to build GNU/Glibc with CDT
because I think it may give you folks more information about how to make
it more flexible.
I'm relatively new to the CDT world so I might have done some mistakes
when I tried to use it. Using Eclipse 3.8RC2 with CDT 8.1.0RC3....
Here goes the steps I followed:
1. Cloned glibc git repository (~/src/glibc). (OK).
2. Imported glibc as "Existing code as Makefile Project". Chose "GNU
Autotools Toolchain" since glibc is a autotools-based project. (OK)
3. Eclipse hangs when indexing the source code. Noticed 500MB, 700MB and
1GB of heap weren't enough to index it. Kept it increasing until 2GB and
it was enough although consuming system swap a lot! Just as references:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322431 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382674 (ERRORS)
4. Converted the project to autotools (File > New > C/C++ > Convert to a
C/C++ Autotools Project). (OK)
5. Set configure options (Properties > Autotools > Configure Settings >
Additional command-line options) (OK)
6. Configure (R-click project > reconfigure project). (ERROR)
It failed because glibc build process is as follow:
wainersm@muon:~/src> cd build/
wainersm@muon:~/src/build> /home/wainersm/src/glibc/configure
--build=powerpc64-linux --host=powerpc64-linux --prefix=/
--exec-prefix=/ --with-tls --with-__thread --enable-shared
--with-selinux=no --with-cpu=power6 --enable-add-ons=nptl
wainersm@muon:~/src/build> cd ../glibc/
wainersm@muon:~/src/glibc> make
glibc build process demands you to run in a separate directory. CDT
Autotools doesn't seems to give me the option change workdir.
glibc build process demands you to just run 'configure' script only. CDT
Autotools will always run "sh -c autoreconf" when reconfiguring the
project. There isn't no option to simply run 'configure'.
7. Reconfigured manually and thus tried to build it via eclipse. It
still fails because autoreconf will always run before managed build take
over the process. (ERROR)
I could gave up of handling it as an autotools project, import as
regular makefile project, run 'configure' as a step before 'make'.
However, I'm not able to add pre/post build steps because it doesn't
have that option in build settings (if you create a cdt managed project
then you will see 'Build steps' tab available to users).
One left option is to created a custom 'Builder' and run as an external
tool. I didn't have to try it though.
I hope that helps.
Thanks,
Wainer