Better detect the correct MacOS toolchain
* We need ELF not Mach-O Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
This commit is contained in:
parent
5d4ada9352
commit
8f5c321507
2
.github/workflows/macos-gcc.yml
vendored
2
.github/workflows/macos-gcc.yml
vendored
@ -40,7 +40,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }} USING_APPLE=1
|
||||
make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }}
|
||||
|
||||
- name: Generate binary information
|
||||
run: ${{ matrix.cross_compile }}readelf -a ./${{ matrix.dir }}/apps/ctors_dtors_priority_test.so > ./${{ matrix.dir }}/apps/readelf.txt
|
||||
|
@ -110,7 +110,7 @@ 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 || echo 0)
|
||||
USING_APPLE ?= 0
|
||||
USING_APPLE ?= $(shell uname -s | grep -q 'Darwin' && echo 1 || echo 0)
|
||||
|
||||
# Rely on GCC MS ABI support?
|
||||
GCCNEWENOUGH := $(shell ( [ $(GCCVERSION) -gt "4" ] \
|
||||
|
@ -37,6 +37,10 @@ Revision History
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#error "Mach-O toolchain isn't supported; please compile with an ELF toolchain from Homebrew"
|
||||
#endif
|
||||
|
||||
#define EFI_FIRMWARE_VENDOR L"INTEL"
|
||||
#define EFI_FIRMWARE_MAJOR_REVISION 12
|
||||
#define EFI_FIRMWARE_MINOR_REVISION 33
|
||||
|
@ -11,7 +11,7 @@ You should have received a copy of the GNU Lesser General Public License along w
|
||||
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if !defined(__APPLE__) && !defined(__GNU_EFI_IS_APPLE)
|
||||
#if !defined(__GNU_EFI_IS_APPLE)
|
||||
#include <elf.h>
|
||||
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user