forked from mirage/mirage-solo5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a Makefile to build libmirage-solo5_bindings.a
The dune C compilation support adds CFLAGS (specifically -fPIC and -fno-strict-aliasing) which are not necessary and should be avoided when compiling libmirage-solo5_bindings.a. This follows from the discussion and solution in mirage/mirage-xen#23. Co-authored-by: Martin Lucina <[email protected]>
- Loading branch information
Showing
5 changed files
with
30 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
(lang dune 2.0) | ||
(lang dune 2.6) | ||
(name mirage-solo5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig | ||
|
||
CC ?= cc | ||
FREESTANDING_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags ocaml-freestanding) | ||
CFLAGS := $(FREESTANDING_CFLAGS) \ | ||
-O2 -std=c99 -Wall -Werror | ||
|
||
.PHONY: all clean | ||
all: libmirage-solo5_bindings.a | ||
|
||
OBJS=alloc_pages_stubs.o clock_stubs.o mm_stubs.o atomic_stubs.o cstruct_stubs.o solo5_block_stubs.o barrier_stubs.o main.o solo5_console_stubs.o checksum_stubs.o solo5_net_stubs.o | ||
|
||
libmirage-solo5_bindings.a: $(OBJS) | ||
$(AR) r $@ $^ | ||
|
||
clean: | ||
$(RM) $(OBJS) libmirage-xen_bindings.a |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters