2014-05-14 23:54 GMT+08:00 Sheheryar Zahoor Qazi <sheheryar.zahoor.qazi@xxxxxxxxx>: > Hi jasonwucj, > Thanky for the reply! > This might seem trivial, but config.gcc is supposed to be the target > specific file. But when I build gcc for my target, config.gcc is not > invoked. Do you have any idea why that would be happening? > Sheheryar > Hi, Sheheryar, The config.gcc is included in the configure process. Check configure.ac, you can see following code fragment: # Collect target-machine-specific information. . ${srcdir}/config.gcc So if the process does not work well as you expect, I think there must be something wrong, either syntax error or logic error, in your implementation in the config.gcc. Best regards, jasonwucj > On Wed, May 14, 2014 at 5:21 AM, Chung-Ju Wu <jasonwucj@xxxxxxxxx> wrote: >> 2014-05-13 22:05 GMT+08:00 Sheheryar Zahoor Qazi >> <sheheryar.zahoor.qazi@xxxxxxxxx>: >>> Hi, >>> I am working on an 18-bit opensource soft-core processor at my >>> university. My task is to emulate floating point operation since there >>> is no hardware unit for float operations. I have the cross compiler >>> and binutils for my target. But upon calling atest program, it gives >>> the following error: >>> >>> : In function `test': >>> (.text+0x0): undefined reference to `__floatsisf' >>> In function `test': >>> : In function `test': >>> (.text+0x2c): undefined reference to `__mulsf3' >>> : In function `test': >>> (.text+0x2e): undefined reference to `__fixsfsi' >>> >>> I realize there needs a machine dependent sfp-machine.h file and I >>> have it for my architecture modified. Can anyone explain me the >>> changes required to be make in the config.gcc file to link my target >>> to soft-fp libraries? and do I need any more changes in gcc build? >>> >>> Thanks >>> >>> Sheheryar >> >> Hi, Sheheryar, >> >> 1. Add sfp-machine.h >> 2. In the libgcc/config.host, add soft-fp makefile fragment like this: >> tmake_file="${tmake_file} t-softfp-sfdf t-softfp >> 3. If required, add t-softfp-excl or t-softfp-tf in the tmake_file as well. >> (See t-softfp for details.) >> >> With the changes above, the necessary soft-fp modules will be compiled >> into your libgcc.a. >> >> >> Best regards, >> jasonwucj