User Tools

Site Tools


vscode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vscode [2025/06/28 07:54] zhangykvscode [2025/07/03 07:10] (current) zhangyk
Line 14: Line 14:
 # Patchelf / VS Code # Patchelf / VS Code
 source /home/usr/share/sysroot/sysroot.sh source /home/usr/share/sysroot/sysroot.sh
 +```
 +or
 +```
 +# Patchelf / VS Code
 +source /home/usr/share/sysroot/sysroot.csh
 ``` ```
  
Line 52: Line 57:
 ``` ```
  
-Maybe you shall remove some experimen variables first, such as `LD_LIBRARY_PATH`, otherwise some unexpected errors.+Maybe you shall remove some experiment variables first, such as `LD_LIBRARY_PATH`, otherwise some unexpected errors.
 ``` ```
 mkdir toolchain-dir mkdir toolchain-dir
Line 80: Line 85:
 ## 3.4. Add a source file ## 3.4. Add a source file
 This is a script for use's convenience. It defines three variables to help VS Code to find the files. I put the script in `sysroot` This is a script for use's convenience. It defines three variables to help VS Code to find the files. I put the script in `sysroot`
 +
 +`sysroot.sh`
 ```sh ```sh
 # Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf) # Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf)
Line 87: Line 94:
 # Path to the patchelf binary on the remote host # Path to the patchelf binary on the remote host
 export VSCODE_SERVER_PATCHELF_PATH=/home/usr/share/sysroot/usr/bin/patchelf export VSCODE_SERVER_PATCHELF_PATH=/home/usr/share/sysroot/usr/bin/patchelf
 +```
 +`sysroot.csh`
 +```csh
 +# Path to the dynamic linker in the sysroot (used for --set-interpreter option with patchelf)
 +setenv VSCODE_SERVER_CUSTOM_GLIBC_LINKER /home/usr/share/sysroot/lib/ld-linux-x86-64.so.2
 +# Path to the library locations in the sysroot (used as --set-rpath option with patchelf)
 +setenv VSCODE_SERVER_CUSTOM_GLIBC_PATH /home/usr/share/sysroot/usr/lib:/home/usr/share/sysroot/lib
 +# Path to the patchelf binary on the remote host
 +setenv VSCODE_SERVER_PATCHELF_PATH /home/usr/share/sysroot/usr/bin/patchelf
 ``` ```
  
Line 93: Line 109:
 chmod 755 sysroot chmod 755 sysroot
 vi sysroot/sysroot.sh vi sysroot/sysroot.sh
 +vi sysroot/sysroot.csh
 chmod 555 sysroot chmod 555 sysroot
 ``` ```
Line 106: Line 123:
 ``` ```
 source /home/usr/share/sysroot/sysroot.sh source /home/usr/share/sysroot/sysroot.sh
 +source /home/usr/share/sysroot/sysroot.csh
 ``` ```
 </markdown> </markdown>
vscode.1751097248.txt.gz · Last modified: 2025/06/28 07:54 by zhangyk