2014-05-20 19:14 GMT+08:00 Sheheryar Zahoor Qazi <sheheryar.zahoor.qazi@xxxxxxxxx>: > Hi Jason! > > >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 > > I think you mean config.host and not config.gcc? because i can find the > following code fragment: > # Collect target-machine-specific information. > . ${srcdir}/config.host > > FYI, I am using gcc 4.4.5! > > Additionally, Can you specify where should i specify sfp-machine.h? > should it go in /gcc-4.4.5/gcc/config/<target>/ or should it be in > /gcc-4.4.5/libgcc/config > Or do i need to make a <target> folder in /gcc-4.4.5/libgcc/config and > specify sfp-machine.h there? > Hi, Sheheryar, Sorry for the late reply. I was busy on the company's project and schedule. Since you are using gcc-4.4.5, which is old and its branch is closed, the soft-fp stuff is located under gcc/config/{target}/ directory. You need to modify gcc/config.gcc to include t-softfp makefile fragment for you target. You can also refer to arm/i386/ia64/rs6000 implementation for more details. :) Best regards, jasonwucj > > On Tue, May 20, 2014 at 7:31 AM, Chung-Ju Wu <jasonwucj@xxxxxxxxx> wrote: >> >> 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 > >