Browse Source

Fix linux 32 bit build (#533)

* Fix linux 32 build

* Enable linux 32 bit github action build
tobil4sk 3 năm trước cách đây
mục cha
commit
b63ebbff04
2 tập tin đã thay đổi với 11 bổ sung11 xóa
  1. 9 10
      .github/workflows/build.yml
  2. 2 1
      src/std/debug.c

+ 9 - 10
.github/workflows/build.yml

@@ -22,10 +22,9 @@ jobs:
       fail-fast: false
       matrix:
         include:
-          # TODO cannot build 32 bit binaries. compile errors
-          #- target: linux-i386
-          #  runner: ubuntu-18.04
-          #  haxe_latest_dist: linux64/haxe_latest.tar.gz
+          - target: linux-i386
+            runner: ubuntu-18.04
+            haxe_latest_dist: linux64/haxe_latest.tar.gz
 
           - target: linux-amd64
             runner: ubuntu-18.04
@@ -56,13 +55,13 @@ jobs:
             msbuild_WindowsTargetPlatformVersion: 8.1
 
     steps:
-    - name: "SCM Checkout" 
+    - name: "SCM Checkout"
       uses: actions/checkout@v2
 
     - name: "Install: Visual C++ build tools workload for Visual Studio 2017 Build Tools"
       if: startsWith(matrix.target, 'win')
       run: choco install visualstudio2017buildtools visualstudio2017-workload-vctools
-      
+
     - name: "Install: Windows 8.1 SDK"
       shell: powershell
       if: startsWith(matrix.target, 'win')
@@ -76,7 +75,7 @@ jobs:
       uses: microsoft/[email protected]
       with:
         vs-version: '[15.0,16.0)'
-    
+
     - name: "Install: Required Dev Packages"
       run: |
         set -eux
@@ -205,7 +204,7 @@ jobs:
               //p:Configuration=${{ matrix.msbuild_Configuration }} \
               //p:Platform=${{ matrix.msbuild_Platform }} \
               //p:PlatformToolset=${{ matrix.msbuild_PlatformToolset }} \
-              //p:WindowsTargetPlatformVersion=${{ matrix.msbuild_WindowsTargetPlatformVersion }} 
+              //p:WindowsTargetPlatformVersion=${{ matrix.msbuild_WindowsTargetPlatformVersion }}
             ;;
         esac
 
@@ -305,14 +304,14 @@ jobs:
   publish-latest-release:
   ###########################################################
     runs-on: ubuntu-latest
-    needs: 
+    needs:
       - build
     if: github.ref == 'refs/heads/master'
     concurrency: publish-latest-release # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idconcurrency
 
     steps:
 
-    - name: "SCM Checkout" 
+    - name: "SCM Checkout"
       # only required by "hub release create" to prevent "fatal: Not a git repository"
       uses: actions/checkout@v2
 

+ 2 - 1
src/std/debug.c

@@ -193,13 +193,14 @@ static void *get_reg( int r ) {
 		case 1: return &regs->rbp;
 		case 2: return &regs->rip;
 		case 10: return &regs->rax;
+		case 11: return (void*)(-((int_val)&fp->xmm_space[0])-1);
 #		else
 		case 0: return &regs->esp;
 		case 1: return &regs->ebp;
 		case 2: return &regs->eip;
 		case 10: return &regs->eax;
+		case 11: return -1;
 #		endif
-		case 11: return (void*)(-((int_val)&fp->xmm_space[0])-1);
 		case 3: return &regs->eflags;
 		default: return &user->u_debugreg[r-4];
 		}