Use cross when building for Linux 32-bit targets
				
					
				
			While in theory this should work without `cross`, compiling `openssl` with the `vendored` feature fails when we run `cargo build --target i686-unknown-linux-musl`.
This commit is contained in:
		
							parent
							
								
									fc51bd6dfd
								
							
						
					
					
						commit
						e1ea800ed7
					
				
							
								
								
									
										12
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							@ -57,8 +57,16 @@ jobs:
 | 
				
			|||||||
            os: ubuntu-20.04
 | 
					            os: ubuntu-20.04
 | 
				
			||||||
            target: i586-unknown-linux-musl
 | 
					            target: i586-unknown-linux-musl
 | 
				
			||||||
            expect_file_re: "ELF.+80386"
 | 
					            expect_file_re: "ELF.+80386"
 | 
				
			||||||
            expect_cross: "--no-expect-cross"
 | 
					            expect_cross: "--expect-cross"
 | 
				
			||||||
            expect_stripped: "--expect-stripped"
 | 
					            expect_stripped: "--no-expect-stripped"
 | 
				
			||||||
 | 
					            can_test: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          - platform_name: Linux-i686
 | 
				
			||||||
 | 
					            os: ubuntu-20.04
 | 
				
			||||||
 | 
					            target: i686-unknown-linux-musl
 | 
				
			||||||
 | 
					            expect_file_re: "ELF.+80386"
 | 
				
			||||||
 | 
					            expect_cross: "--expect-cross"
 | 
				
			||||||
 | 
					            expect_stripped: "--no-expect-stripped"
 | 
				
			||||||
            can_test: true
 | 
					            can_test: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          - platform_name: Linux-mips
 | 
					          - platform_name: Linux-mips
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,7 @@
 | 
				
			|||||||
 | 
					- Use `cross` when compiling for 32-bit Linux targets. While in theory this should work without
 | 
				
			||||||
 | 
					  `cross`, compiling `openssl` with the `vendored` feature fails when we run
 | 
				
			||||||
 | 
					  `cargo build --target i686-unknown-linux-musl`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 0.0.10 - 2023-12-10
 | 
					## 0.0.10 - 2023-12-10
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Fixed handling of crates with multiple binaries. Attempting to strip binaries for such a crate
 | 
					- Fixed handling of crates with multiple binaries. Attempting to strip binaries for such a crate
 | 
				
			||||||
 | 
				
			|||||||
@ -10,7 +10,11 @@ if uname -a | grep --quiet --extended-regexp -i "darwin|msys|windows"; then
 | 
				
			|||||||
    exit 0
 | 
					    exit 0
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if echo "$TARGET" | grep --quiet --extended-regexp -i '(x86_64|586|686).+linux-(gnu|musl)'; then
 | 
					# On Linux, we should be able to cross-compile to i586 and i686, but in
 | 
				
			||||||
 | 
					# practice this fails with some crates, notably openssl with the "vendored"
 | 
				
			||||||
 | 
					# feature. This feature makes it compile openssl itself, which fails without
 | 
				
			||||||
 | 
					# cross.
 | 
				
			||||||
 | 
					if echo "$TARGET" | grep --quiet --extended-regexp -i 'x86_64.+linux-(gnu|musl)'; then
 | 
				
			||||||
    echo "needs-cross=false" >> $GITHUB_OUTPUT
 | 
					    echo "needs-cross=false" >> $GITHUB_OUTPUT
 | 
				
			||||||
    exit 0
 | 
					    exit 0
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user