On Sun, 11 Dec 2022, 09:54 Mahmoud, Abdulrahman (DI SW ICS MNA), < Abdulrahman_Mahmoud@xxxxxxxxxx> wrote: > Hi, > > I am facing an issue in the GCC on ubuntu 20 as it can't find the crti.o > and crtn.o during linking. > The GCC I am using is being built on Redhat6.5 so it searches for the > missing files in /lib instead of /lib/x86_64-linux-gnu. > > I was searching for a way to configure the GCC to include the > /lib/x86_64-linux-gnu directory in the search dirs while building on > Redhat6.5. > Maybe you're looking for the --enable-multiarch option, but why are you doing this? If you want a compiler that works with Ubuntu conventions, build it on Ubuntu. I found a configuration option called --with-specs so I was thinking I may > add this line "%:if-exists-else(crti.o /lib/x86_64-linux-gnu/crti.o)" to > the --with-specs to be added to Startfile spec name. > > Is this possible with some sort of syntax and if it's not, is there any > other way that I can add the /lib/x86_64-linux-gnu directory to the search > dirs during the configuration? > --enable-multiarch But I think you're trying to solve the wrong problem. > I would really appreciate your help. > > Thanks, > Abdulrahman >