Browse Source

make DWARF info output actually work

pull/17/head
PoroCYon 1 year ago
parent
commit
2b2efa3d21
2 changed files with 11 additions and 3 deletions
  1. +3
    -3
      Makefile
  2. +8
    -0
      smold.py

+ 3
- 3
Makefile View File

@ -21,8 +21,8 @@ CXXOPTFLAGS=$(COPTFLAGS) -fno-exceptions \
-fno-rtti -fno-enforce-eh-specs -fnothrow-opt -fno-use-cxa-get-exception-ptr \
-fno-implicit-templates -fno-threadsafe-statics -fno-use-cxa-atexit
CFLAGS=-Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC $(COPTFLAGS) #-DUSE_DL_FINI
CXXFLAGS=-Wall -Wextra -Wpedantic -std=c++11 $(CXXOPTFLAGS) -nostartfiles -fno-PIC
CFLAGS=-g -Wall -Wextra -Wpedantic -std=gnu11 -nostartfiles -fno-PIC $(COPTFLAGS) #-DUSE_DL_FINI
CXXFLAGS=-g -Wall -Wextra -Wpedantic -std=c++11 $(CXXOPTFLAGS) -nostartfiles -fno-PIC
CFLAGS += -m$(BITS) $(shell pkg-config --cflags sdl2)
CXXFLAGS += -m$(BITS) $(shell pkg-config --cflags sdl2)
@ -41,7 +41,7 @@ LIBS = $(filter-out -pthread,$(shell pkg-config --libs sdl2)) -lX11 -lm -lc #-lG
PWD ?= .
SMOLFLAGS = --smolrt "$(PWD)/rt" --smolld "$(PWD)/ld" \
--verbose #--keeptmp
--verbose -g #--keeptmp
# -fuse-dnload-loader -fskip-zero-value -fuse-nx -fskip-entries -fuse-dt-debug
# -fuse-dl-fini -fno-start-arg -funsafe-dynamic


+ 8
- 0
smold.py View File

@ -37,6 +37,9 @@ def main():
parser.add_argument('-d', '--det', default=False, action='store_true', \
help="Make the order of imports deterministic (default: just use " + \
"whatever binutils throws at us)")
parser.add_argument('-g', '--debug', default=False, action='store_true', \
help="Pass `-g' to the C compiler, assembler and linker. Only useful "+\
"when `--debugout' is specified.")
parser.add_argument('-fuse-interp', default=True, action='store_true', \
help="[Default ON] Include a program interpreter header (PT_INTERP). If not " +\
@ -143,6 +146,11 @@ def main():
if args.hash16 and args.crc32c: # shouldn't happen anymore
error("Cannot combine --hash16 and --crc32c!")
if args.debug:
args.cflags.append('-g')
args.ldflags.append('-g')
args.asflags.append('-g')
if args.hash16 or args.crc32c:
args.fuse_dnload_loader = True


Loading…
Cancel
Save