Remove useless artifacts, revert CFLAGS optimization to native, check if it compiles on musl

This commit is contained in:
Franck STAUFFER 2020-08-17 11:48:30 +02:00
parent b1050eb74b
commit 270602220f
Signed by: franck.stauffer
GPG Key ID: AAF5A94045CEC261
2 changed files with 15 additions and 11 deletions

View File

@ -1,15 +1,19 @@
image: debian:stable-slim
stages:
-build
build:
debian:
image: debian:stable-slim
stage: build
before_script:
- apt-get -qq update
- apt-get -qq install build-essential libsdl2-mixer-dev libsdl2-dev
- apt-get -qq install make clang libsdl2-mixer-dev libsdl2-dev
script:
- make
artifacts:
name: "generic-x86_64-build"
paths:
- "bin/chip8"
- "resources/buzzer.wav"
expire_in: 1 week
- make CC=clang
alpine:
image: alpine:latest
stage: build
before_script:
- apk add make clang sdl2-dev sld2_mixer-dev
script:
- make CC=clang

View File

@ -1,5 +1,5 @@
CPPFLAGS = -D_DEFAULT_SOURCE -D_FOTIFY_SOURCE=2
CFLAGS = $(CPPFLAGS) -std=c99 -pedantic -Wall -Wextra -mtune=generic -march=x86-64 -O2 -fstack-protector -flto -fPIE -pipe
CFLAGS = $(CPPFLAGS) -std=c99 -pedantic -Wall -Wextra -mtune=native -march=native -O2 -fstack-protector -flto -fPIE -pipe
LDFLAGS = -Wl,-z,relro,-z,now,-O2,--strip-all -lSDL2 -lSDL2_mixer -flto -pie
default: bin obj bin/chip8