reduce diff to other archs
authorjsg <jsg@openbsd.org>
Sat, 24 Apr 2021 06:08:41 +0000 (06:08 +0000)
committerjsg <jsg@openbsd.org>
Sat, 24 Apr 2021 06:08:41 +0000 (06:08 +0000)
ok deraadt@ mlarkin@

sys/arch/riscv64/conf/Makefile.riscv64

index 08112bb..17138e7 100644 (file)
@@ -51,23 +51,23 @@ CMACHFLAGS+=        -fno-stack-protector
 .endif
 .if ${IDENT:M-DSMALL_KERNEL}
 SORTR=         cat
-COPTS?=                -Oz
+COPTIMIZE?=    -Oz
 .endif
 
 DEBUG?=                -g
-COPTS?=                -O2 # XXX Optimization Disabled for Debugging
-CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+COPTIMIZE?=    -O2
+CFLAGS=                ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTIMIZE} ${COPTS} ${PIPE}
 AFLAGS=                -D_LOCORE -x assembler-with-cpp ${CWARNFLAGS} ${CMACHFLAGS}
-LINKFLAGS=     -T ld.script -X --warn-common -no-pie
+LINKFLAGS=     -T ld.script -X --warn-common -nopie
 
 HOSTCC?=       ${CC}
 HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
 HOSTED_CFLAGS= ${CFLAGS}
 HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
 
-NORMAL_C_NOP=  ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
+NORMAL_C_NOP=  ${CC} ${CFLAGS} ${CPPFLAGS} -fno-ret-protector -c $<
 NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
+NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} ${PROF} -c $<
 
 %OBJS