Set $ORIGIN based rpath on shared linux binaries
This commit is contained in:
		
							parent
							
								
									fbbdbf4905
								
							
						
					
					
						commit
						a0384b8b70
					
				
					 1 changed files with 28 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								scripts.d/99-rpath.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								scripts.d/99-rpath.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,28 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_enabled() {
 | 
				
			||||||
 | 
					    [[ $TARGET == linux* ]]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerfinal() {
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerlayer() {
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerstage() {
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_dockerbuild() {
 | 
				
			||||||
 | 
					    return 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ffbuild_configure() {
 | 
				
			||||||
 | 
					    if [[ $VARIANT == *shared* ]]; then
 | 
				
			||||||
 | 
					        # Can't escape escape hell
 | 
				
			||||||
 | 
					        echo --extra-ldexeflags=\'-Wl,-rpath='\\\\\\\$\\\$ORIGIN'\\ -Wl,-rpath='\\\\\\\$\\\$ORIGIN/../lib'\'
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue