On 2013/09/20 12:40, John Carr wrote: > > Is it possible to build gcc 4.8 / 4.9 (development) for OpenBSD 5.3 amd64? > > I tried and failed. The first stage compiler fails building libgomp > because of a relocation problem in a DWARF frame descriptor. > > "relocation R_X86_64_32 can not be used when making a shared object" > > I am not explicitly making a shared object but who knows what's going on > internally. > > Thinking that the old GNU assembler might be at fault I fetched a recent > binutils. Compiling that fails because the compiler gives errors about > use of the "struct hack" (which is now blessed by standards, but still > dangerous). I beat on the code to avoid the warning. The next obstacle > is x86-64 openbsd is not a supported target for the linker. I changed > the target script to treat it like netbsd. And I don't know what error > will come next, but I expect to find one. And I don't know if old binutils > is really the problem? > > Any advice? >
gcc 4.8 is in packages in -current and the upcoming release OpenBSD 5.4, if you want to try and build it on 5.3 then fetching the port from the OPENBSD_5_4 branch is probably your best starting point, you may need to disable ada by removing amd64 from the ONLY_FOR_ARCHS-ada line to avoid the binary bootstrap which is required). For 4.9 your best starting point is probably to get 4.8.1 building and then copy/modify the port to point at 4.9 instead.