mirror of https://github.com/ncroxon/gnu-efi
commit
50772688f0
|
@ -1,39 +0,0 @@
|
|||
name: Linux, gcc
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { arch: ia32, gcc: multilib, cross_compile: }
|
||||
- { arch: x86_64, gcc: multilib, cross_compile: }
|
||||
- { arch: aa64, gcc: aarch64-linux-gnu, cross_compile: aarch64-linux-gnu- }
|
||||
- { arch: arm, gcc: arm-linux-gnueabihf, cross_compile: arm-linux-gnueabihf- }
|
||||
- { arch: riscv64, gcc: riscv64-linux-gnu, cross_compile: riscv64-linux-gnu- }
|
||||
- { arch: mips64el, gcc: mips64el-linux-gnuabi64, cross_compile: mips64el-linux-gnuabi64- }
|
||||
# - { arch: loongarch64, gcc: loongarch64-linux-gnu, cross_compile: loongarch64-linux-gnu- }
|
||||
|
||||
steps:
|
||||
- name: Install toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-${{ matrix.gcc }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }}
|
|
@ -0,0 +1,48 @@
|
|||
name: Linux, gcc
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [ia32, x64, aa64, arm, riscv64, mips64]
|
||||
include:
|
||||
- arch: ia32
|
||||
gcc: multilib
|
||||
cross_compile:
|
||||
- arch: x64
|
||||
gcc: multilib
|
||||
cross_compile:
|
||||
- arch: aa64
|
||||
gcc: aarch64-linux-gnu
|
||||
cross_compile: aarch64-linux-gnu-
|
||||
- arch: arm
|
||||
gcc: arm-linux-gnueabihf
|
||||
cross_compile: arm-linux-gnueabihf-
|
||||
- arch: riscv64
|
||||
gcc: riscv64-linux-gnu
|
||||
cross_compile: riscv64-linux-gnu-
|
||||
- arch: mips64
|
||||
gcc: mips64el-linux-gnuabi64
|
||||
cross_compile: mips64el-linux-gnuabi64-
|
||||
# - arch: loongarch64
|
||||
# gcc: loongarch64-linux-gnu
|
||||
# cross_compile: loongarch64-linux-gnu-
|
||||
|
||||
steps:
|
||||
- name: Install toolchain
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-${{ matrix.gcc }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }}
|
|
@ -0,0 +1,31 @@
|
|||
name: Linux, MinGW
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
MinGW-Build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x64, ia32]
|
||||
include:
|
||||
- arch: x64
|
||||
pkg: gcc-mingw-w64-x86-64
|
||||
tuple: x86_64-w64-mingw32-
|
||||
- arch: ia32
|
||||
pkg: gcc-mingw-w64-i686
|
||||
tuple: i686-w64-mingw32-
|
||||
|
||||
steps:
|
||||
- name: Checkout repository and submodules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Install gcc toolchain
|
||||
run: sudo apt install ${{ matrix.pkg }}
|
||||
|
||||
- name: Build
|
||||
run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.tuple }} lib
|
|
@ -0,0 +1,42 @@
|
|||
name: Windows, MinGW
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
MinGW-Build:
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
arch: [x64, ia32]
|
||||
include:
|
||||
- arch: x64
|
||||
sys: mingw64
|
||||
env: x86_64
|
||||
- arch: ia32
|
||||
sys: mingw32
|
||||
env: i686
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
|
||||
steps:
|
||||
- name: Install MinGW
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
update: true
|
||||
install: >-
|
||||
mingw-w64-${{ matrix.env }}-toolchain
|
||||
base-devel
|
||||
git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Build
|
||||
run: make lib
|
|
@ -1,12 +1,6 @@
|
|||
name: Windows, VS2022
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
SOLUTION_FILE_PATH: ./gnu-efi.sln
|
|
@ -89,8 +89,16 @@ ifeq ($(ARCH),amd64)
|
|||
override ARCH := x86_64
|
||||
endif
|
||||
|
||||
GCCVERSION := $(shell $(CC) -dumpversion | cut -f1 -d.)
|
||||
GCCMINOR := $(shell $(CC) -dumpversion | cut -f2 -d.)
|
||||
# Allow UEFI shorthands to be specified for the arch
|
||||
ifeq ($(ARCH),x64)
|
||||
override ARCH := x86_64
|
||||
endif
|
||||
ifeq ($(ARCH),mips64)
|
||||
override ARCH := mips64el
|
||||
endif
|
||||
|
||||
GCCVERSION := $(shell $(CC) -dumpversion | sed -e 's/-win32/.0/' | cut -f1 -d.)
|
||||
GCCMINOR := $(shell $(CC) -dumpversion | sed -e 's/-win32/.0/' | cut -f2 -d.)
|
||||
USING_CLANG := $(shell $(CC) -v 2>&1 | grep -q 'clang version' && echo clang)
|
||||
|
||||
# Rely on GCC MS ABI support?
|
||||
|
|
18
lib/ctors.S
18
lib/ctors.S
|
@ -3,30 +3,46 @@
|
|||
* older or out-of-tree linker scripts will still work.
|
||||
*/
|
||||
/*
|
||||
* Note that these aren't the using the GNU "CONSTRUCTOR" output section
|
||||
* Note that these aren't using the GNU "CONSTRUCTOR" output section
|
||||
* command, so they don't start with a size. Because of p2align and the
|
||||
* end/END definitions, and the fact that they're mergeable, they can also
|
||||
* have NULLs which aren't guaranteed to be at the end.
|
||||
*/
|
||||
#if defined(__ELF__)
|
||||
.section .init_array,"aw",%init_array
|
||||
#else
|
||||
.section .init_array,"aw"
|
||||
#endif
|
||||
.p2align 4, 0
|
||||
.globl __init_array_start
|
||||
__init_array_start:
|
||||
.globl __init_array_end
|
||||
__init_array_end:
|
||||
#if defined(__ELF__)
|
||||
.section .ctors,"aw",%progbits
|
||||
#else
|
||||
.section .ctors,"aw"
|
||||
#endif
|
||||
.p2align 4, 0
|
||||
.globl __CTOR_LIST__
|
||||
__CTOR_LIST__:
|
||||
.globl __CTOR_END__
|
||||
__CTOR_END__:
|
||||
#if defined(__ELF__)
|
||||
.section .dtors,"aw",%progbits
|
||||
#else
|
||||
.section .dtors,"aw"
|
||||
#endif
|
||||
.p2align 4, 0
|
||||
.globl __DTOR_LIST__
|
||||
__DTOR_LIST__:
|
||||
.globl __DTOR_END__
|
||||
__DTOR_END__:
|
||||
#if defined(__ELF__)
|
||||
.section .fini_array,"aw",%fini_array
|
||||
#else
|
||||
.section .fini_array,"aw"
|
||||
#endif
|
||||
.p2align 4, 0
|
||||
.globl __fini_array_start
|
||||
__fini_array_start:
|
||||
|
|
Loading…
Reference in New Issue