[ELDK] Ubuntu 12.04.1 and ELDK 4.0

Kalle Pokki kallepokki at gmail.com
Wed Sep 12 10:12:37 CEST 2012


On Tue, Sep 11, 2012 at 10:17 AM, Kalle Pokki <kallepokki at gmail.com> wrote:

> I have had similar issues with ELDK and the recent Ubuntu release (64-bit)
> as reported here in August. Cpp seems to drop the "usr" part from the header
> search path, thus not finding any of the headers, if ELDK is installed in
> "/opt/eldk/4.0". Strangely, this works if ELDK is installed in "/opt/eldk".
> However, ld is still unable to find ld.so.1 in either installation place.

Fixed the search path problems by modifying the compiler specs. Dumped
the specs with 'ppc_82xx-gcc -dumpspecs', then modified it by adding
the correct search paths as follows:

/opt/eldk/4.0/ppc_82xx/usr/lib$ diff -u specs.dump specs
--- specs.dump  2012-09-12 10:43:33.559986079 +0300
+++ specs       2012-09-12 10:07:28.956028369 +0300
@@ -15,7 +15,7 @@
  as %(asm_options) %|.s %A }

 *cpp:
-%{posix: -D_POSIX_SOURCE} %{mads         : %(cpp_os_ads)         ;
myellowknife : %(cpp_os_yellowknife) ;   mmvme        : %(cpp_os_mvme)
       ;   msim         : %(cpp_os_sim)         ;   mwindiss     :
%(cpp_os_windiss)     ;   mcall-freebsd: %(cpp_os_freebsd)     ;
mcall-linux  : %(cpp_os_linux)       ;   mcall-gnu    : %(cpp_os_gnu)
       ;   mcall-netbsd : %(cpp_os_netbsd)      ;   mcall-openbsd:
%(cpp_os_openbsd)     ;                : %(cpp_os_default)     }
+%{posix: -D_POSIX_SOURCE} %{mads         : %(cpp_os_ads)         ;
myellowknife : %(cpp_os_yellowknife) ;   mmvme        : %(cpp_os_mvme)
       ;   msim         : %(cpp_os_sim)         ;   mwindiss     :
%(cpp_os_windiss)     ;   mcall-freebsd: %(cpp_os_freebsd)     ;
mcall-linux  : %(cpp_os_linux)       ;   mcall-gnu    : %(cpp_os_gnu)
       ;   mcall-netbsd : %(cpp_os_netbsd)      ;   mcall-openbsd:
%(cpp_os_openbsd)     ;                : %(cpp_os_default)     }
-isystem /opt/eldk/4.0/usr/lib/gcc/powerpc-linux/4.0.0/include
-isystem /opt/eldk/4.0/usr/../ppc_82xx/usr/include

 *cpp_options:
 %(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*}
%{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}}
%{O*} %{undef} %{save-temps:-fpch-preprocess}
@@ -45,7 +45,7 @@
 %{mads         : crtsavres.o%s        %(endfile_ads)         ;
myellowknife : crtsavres.o%s        %(endfile_yellowknife) ;   mmvme
     : crtsavres.o%s        %(endfile_mvme)        ;   msim         :
crtsavres.o%s        %(endfile_sim)         ;   mwindiss     :
             %(endfile_windiss)     ;   mcall-freebsd: crtsavres.o%s
     %(endfile_freebsd)     ;   mcall-linux  : crtsavres.o%s
%(endfile_linux)       ;   mcall-gnu    : crtsavres.o%s
%(endfile_gnu)         ;   mcall-netbsd : crtsavres.o%s
%(endfile_netbsd)      ;   mcall-openbsd: crtsavres.o%s
%(endfile_openbsd)     ;                : %(crtsavres_default)
%(endfile_default)     }

 *link:
-%{!static:--eh-frame-hdr} %{h*} %{v:-V} %{!msdata=none:%{G*}}
%{msdata=none:-G0} %{YP,*} %{R*} %{Qy:} %{!Qn:-Qy} %(link_shlib)
%{!Wl,-T*: %{!T*: %(link_start) }} %(link_target) %(link_os)
+%{!static:--eh-frame-hdr} %{!-rpath-link*:-rpath-link
/opt/eldk/4.0/ppc_82xx/lib/:/opt/eldk/4.0/ppc_82xx/usr/lib/} %{h*}
%{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} %{YP,*} %{R*} %{Qy:}
%{!Qn:-Qy} %(link_shlib) %{!Wl,-T*: %{!T*: %(link_start) }}
%(link_target) %(link_os)

 *lib:
 %{mads         : %(lib_ads)         ;   myellowknife :
%(lib_yellowknife) ;   mmvme        : %(lib_mvme)        ;   msim
   : %(lib_sim)         ;   mwindiss     : %(lib_windiss)     ;
mcall-freebsd: %(lib_freebsd)     ;   mcall-linux  : %(lib_linux)
 ;   mcall-gnu    : %(lib_gnu)         ;   mcall-netbsd :
%(lib_netbsd)      ;   mcall-openbsd: %(lib_openbsd)     ;
   : %(lib_default)     }


The same modification needs to be done for all compiler architectures
used. Works like a charm again! The only difference I noted was that
now if I have '-isystem somepath' in my Makefile, it now has a lower
priority than the paths specified in the specs file. Before this the
built-in specs had lower priority.


More information about the eldk mailing list