From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 02 Nov 2008 21:32:40 +0100 Subject: [U-Boot] [patch 1/1] Remove linking to libgcc while compiling U-boot In-Reply-To: <3efb10970811021218g6d30d611r479c8e800991abf4@mail.gmail.com> References: <20081031223732.621253131@bohmer.net> <20081031224856.847997187@bohmer.net> <20081031231754.GA6331@ld0162-tx32.am.freescale.net> <3efb10970811021218g6d30d611r479c8e800991abf4@mail.gmail.com> Message-ID: <20081102203240.F1EEF8226F7F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "Remy Bohmer", In message <3efb10970811021218g6d30d611r479c8e800991abf4@mail.gmail.com> you wrote: > > libgcc could also expect the 'raise()' routine to pass divide-by-zero > execeptions. (if __div0, (or __aeabi_ldiv0) is not overruled) raise()? exceptions? In C? > In the mean time things are getting more clear. In the ARM section of > U-boot a large amount of (division) routines which are usually > provided by libgcc are also implemented in the lib_arm directory. For > many ARM boards it is therefore possible to remove linking to libgcc > at all, and it won't hurt the resulting binary at all (because nothing > is currently used from libgcc on ARM). ...unless you use some (probably older) tool chains where this may break. I guess there was a readon to add these functions. We did not do this for the fun of it. > Some routines are still lacking in the lib_arm tree and if GCC starts > generating code (due to some code change) that > requires those missing routines, we now get link errors if a EABI only > compiler is used. (If for example the eabi compiler toolchain of > CodeSourcery is used (e.g. 2008q1) then the provided libgcc is not > So, I agree (now) that libgcc should be used, but this is _not the > case_ currently in the ARM tree. I think I saw libgcc on the linker command line ? > What I now believe that should be done is to investigate (compile > time) what type of ABI is supported by the libgcc provided by the > compiler, and adjust the compile settings to that ABI. If such a thing needs to be done, it is a compiler-issue, and we do not have to know or care about that. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Life is a game. Money is how we keep score. - Ted Turner