Hello Richard, > > > >> >> > How much other changes will be currently accepted here? There is other > >> >> > stuff which I want to prepare and submit here, e.g.: > > > >> >> > 3. fix use of ll/sc in libgomp, either increase mips ISA level or use > >> >> > syscall (which is broken in Linux 2.6.35.4). > > > > The attached patch fixes problem 3. libgomp was not the cause of the > > problem. When linux is detected in gcc/config.gcc, the variable > > "with_llsc" is set to "yes". This happens before the CPU is checked. I > > fixed this by storing the original parameter. I think this is better > > than moving the code up. > > I think this shows that the current mips*-linux* targets are setting > with_llsc in the wrong place. They should be doing it further down, > where other with_foo defaults are set. > > Also, I only just noticed that VxWorks and R5900 were setting with_arch > in the with_cpu block. --with-cpu isn't supported/meaningful for MIPS. > > Is the second patch below OK for your target? (Not yet applied.) > > > The patch for gcc/config/mips/mips.h fixes that ".set mips2" wasn't used > > when with_llsc=yes was configured. > > > > The patch for gcc/config/mips/mips.c gets lld and scd working. These > > instructions are normally not emulated by the Linux kernel and the > > syscall only supports 32 bit. So I changed my kernel to support lld and > > scd. > > Looks good, thanks. I tweaked the mips.c change to follow coding > conventions and kept !TARGET_MIPS16 last.
Yes, the patch is OK. Checked, tested and working. Best regards Jürgen