!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

583 Members
127 Servers

Load older messages


SenderMessageTime
26 Mar 2025
@k900:0upti.meK900But also looks like they have mailing lists 20:48:32
@k900:0upti.meK900https://sourceware.org/newlib/20:48:34
@k900:0upti.meK900I don't know how active they are though 20:48:43
@stephen:crabsin.spacen3tcatoh no20:48:44
@stephen:crabsin.spacen3tcatHow bad would it be to just open a PR to nixpkgs with your patch? I am not sure how much I want to deal with newlib stuff20:49:10
@k900:0upti.meK900Uhhh20:49:44
@k900:0upti.meK900I mean you can 20:49:56
@k900:0upti.meK900But generally I think if the upstream is at least somewhat alive, it's worth it to reach out 20:50:22
@k900:0upti.meK900Because it both makes things easier for the commons 20:50:36
@stephen:crabsin.spacen3tcatOkay I'll do my best20:50:41
@k900:0upti.meK900And makes things easier for nixpkgs long term 20:50:42
@k900:0upti.meK900But also especially with those older crustier upstreams it's often easier to talk to people first before you throw a patch over the fence 20:51:33
@emilazy:matrix.orgemilySCCS and RCS disliked this post.20:57:34
28 Mar 2025
@kamillaova:matrix.orgKamilla 'ovaHi, qt6 cross is still not supported?15:23:43
@kamillaova:matrix.orgKamilla 'ovaOr maybe there were attempts to fix it? After mine in August 202415:25:10
@k900:0upti.meK900I don't think there have been any15:26:21
@k900:0upti.meK9006.9 has some build system changes that might help?15:26:28
@k900:0upti.meK900But I really don't have the spoons to commit to it15:26:43
@kamillaova:matrix.orgKamilla 'ova If they removed shitty libraries search in qtmultimedia, that would be good 15:27:55
@k900:0upti.meK900I do however have a PR that gets 6.9 building15:27:57
@k900:0upti.meK900github.com/NixOS/nixpkgs/pull/39365515:27:58
@k900:0upti.meK900* https://github.com/NixOS/nixpkgs/pull/39365515:28:02
@k900:0upti.meK900(on native)15:28:07
@scottytheengineer:matrix.orgscottytheengineer joined the room.18:15:50
@stephen:crabsin.spacen3tcat

K900 Alright this may be a NixOS related cross compiling question but maybe not.

I have a very simple C program that looks like this:

void _start() {
  volatile long *a = (long *)0x1FFA0;
  volatile long *b = (long *)0x1FFA8;
  volatile long *c = (long *)0x1FFB0;

  *c = *b / *a;

  for(;;) {}
}

This relies on doing software division (the actual hardware instruction can only do 32 bit / 16 bit -> 16 bit or something like that). So it calls __divsi3.

__divsi3 seems to be compiled incorrectly. It tries to use a BSR.L instruction, which doesn't exist on the m68k. It only has the BSR.W and BSR.B instructions. I am wondering what I would need to do to fix this

20:16:07
@k900:0upti.meK900 Maybe you need the right -march? 20:16:52
@stephen:crabsin.spacen3tcat I'm using -m68000 and I've tried playing around with the -march flags. It seems like my actual code compiles just fine but it's almost like the __whatever helpers are being compiled for the wrong CPU 20:17:27
@stephen:crabsin.spacen3tcat
test.bin: test.o Linker.ld
	m68k-unknown-none-elf-gcc -T Linker.ld -o test.bin -O2 -m68000 -Wall -Wextra -nostdlib test.o -ffreestanding -lgcc

%.o: %.c
	m68k-unknown-none-elf-gcc -m68000 -c $< -o $@ -ffreestanding -nostdlib -O0 -Wall -Wextra -fno-PIC -static-libgcc

Here's my makefile btw

20:17:43
@k900:0upti.meK900Oh 20:18:27
@k900:0upti.meK900Yeah that could be it 20:18:31

Show newer messages


Back to Room ListRoom Version: 6