Peter Moulder fixed CFLAGS
This commit is contained in:
parent
360e6533c9
commit
28d744ee6a
36
Makefile
36
Makefile
@ -63,13 +63,29 @@ TARFILES := AUTHORS BUGS NEWS README TODO COPYING COPYING.LIB \
|
|||||||
|
|
||||||
CURSES := -I/usr/include/ncurses -lncurses
|
CURSES := -I/usr/include/ncurses -lncurses
|
||||||
|
|
||||||
LDFLAGS := -Wl,-warn-common
|
# Preprocessor flags.
|
||||||
|
PKG_CPPFLAGS := -D_GNU_SOURCE -I proc
|
||||||
|
CPPFLAGS :=
|
||||||
|
ALL_CPPFLAGS := $(PKG_CPPFLAGS) $(CPPFLAGS)
|
||||||
|
|
||||||
CFLAGS := -D_GNU_SOURCE -O2 -g3 -fno-common -ffast-math -I proc \
|
# Left out -Wconversion due to noise in glibc headers.
|
||||||
|
# Left out a number of things that older compilers lack:
|
||||||
|
# -Wpadded -Wunreachable-code -Wdisabled-optimization
|
||||||
|
#
|
||||||
|
# Since none of the PKG_CFLAGS things are truly required
|
||||||
|
# to compile procps, they might best be moved to CFLAGS.
|
||||||
|
# On the other hand, they aren't normal -O -g things either.
|
||||||
|
#
|
||||||
|
PKG_CFLAGS := -fno-common -ffast-math \
|
||||||
-W -Wall -Wshadow -Wcast-align -Wredundant-decls \
|
-W -Wall -Wshadow -Wcast-align -Wredundant-decls \
|
||||||
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return \
|
-Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return \
|
||||||
# -Wpadded -Wunreachable-code -Wdisabled-optimization \
|
-Wstrict-prototypes -Wmissing-prototypes
|
||||||
-Wstrict-prototypes -Wmissing-prototypes # -Wconversion
|
CFLAGS := -O2 -g3
|
||||||
|
ALL_CFLAGS := $(PKG_CFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
PKG_LDFLAGS := -Wl,-warn-common
|
||||||
|
LDFLAGS :=
|
||||||
|
ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
|
||||||
|
|
||||||
############ misc.
|
############ misc.
|
||||||
|
|
||||||
@ -112,7 +128,7 @@ CLEAN += $(junk) $(foreach dir,$(DIRS),$(addprefix $(dir), $(junk)))
|
|||||||
#endif
|
#endif
|
||||||
#
|
#
|
||||||
#%.d: %.c
|
#%.d: %.c
|
||||||
# depend.sh $(CFLAGS) $< > $@
|
# depend.sh $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< > $@
|
||||||
############
|
############
|
||||||
|
|
||||||
# don't want to type "make procps-$(TARVERSION).tar.gz"
|
# don't want to type "make procps-$(TARVERSION).tar.gz"
|
||||||
@ -140,21 +156,21 @@ install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL))
|
|||||||
############ prog.c --> prog.o
|
############ prog.c --> prog.o
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
$(CC) $(CFLAGS) -c -o $@ $^
|
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c -o $@ $^
|
||||||
|
|
||||||
w.o: w.c
|
w.o: w.c
|
||||||
$(CC) $(CFLAGS) $(W_SHOWFROM) -c $<
|
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(W_SHOWFROM) -c $<
|
||||||
|
|
||||||
############ prog.o --> prog
|
############ prog.o --> prog
|
||||||
|
|
||||||
pmap w uptime tload free sysctl vmstat utmp pgrep skill: % : %.o $(LIBPROC)
|
pmap w uptime tload free sysctl vmstat utmp pgrep skill: % : %.o $(LIBPROC)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^
|
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
top: % : %.o $(LIBPROC)
|
top: % : %.o $(LIBPROC)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(CURSES)
|
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(CURSES)
|
||||||
|
|
||||||
watch: % : %.o
|
watch: % : %.o
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(CURSES)
|
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ $(CURSES)
|
||||||
|
|
||||||
############ progX --> progY
|
############ progX --> progY
|
||||||
|
|
||||||
|
1
NEWS
1
NEWS
@ -1,5 +1,6 @@
|
|||||||
procps-3.1.11 --> procps-3.1.12
|
procps-3.1.11 --> procps-3.1.12
|
||||||
|
|
||||||
|
required flags moved out of CFLAGS #205429
|
||||||
RPM generation handles /lib64
|
RPM generation handles /lib64
|
||||||
WCHAN skips leading '.'
|
WCHAN skips leading '.'
|
||||||
vmstat: numerous new features
|
vmstat: numerous new features
|
||||||
|
3
README
3
README
@ -16,9 +16,6 @@ INSTALLATION
|
|||||||
named t, v, and p to ensure that the correct libproc
|
named t, v, and p to ensure that the correct libproc
|
||||||
(the new one) is used during your testing.
|
(the new one) is used during your testing.
|
||||||
|
|
||||||
If you need to add a compiler option, use CC to do it:
|
|
||||||
make CC='gcc -foo'
|
|
||||||
|
|
||||||
You may set SKIP to avoid building or installing things.
|
You may set SKIP to avoid building or installing things.
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ endif
|
|||||||
|
|
||||||
# Separate rule for this directory, to use -fpic or -fPIC
|
# Separate rule for this directory, to use -fpic or -fPIC
|
||||||
$(filter-out proc/version.o,$(LIBOBJ)): proc/%.o: proc/%.c
|
$(filter-out proc/version.o,$(LIBOBJ)): proc/%.o: proc/%.c
|
||||||
$(CC) -c $(CFLAGS) $(LIBFLAGS) $< -o $@
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LIBFLAGS) $< -o $@
|
||||||
|
|
||||||
LIB_X := COPYING module.mk library.map
|
LIB_X := COPYING module.mk library.map
|
||||||
TARFILES += $(LIBSRC) $(LIBHDR) $(addprefix proc/,$(LIB_X))
|
TARFILES += $(LIBSRC) $(LIBHDR) $(addprefix proc/,$(LIB_X))
|
||||||
@ -51,7 +51,7 @@ proc/$(SONAME): $(LIBOBJ)
|
|||||||
|
|
||||||
# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT
|
# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT
|
||||||
proc/.depend: $(LIBSRC) $(LIBHDR)
|
proc/.depend: $(LIBSRC) $(LIBHDR)
|
||||||
$(strip $(CC) $(LIB_CFLAGS) -MM -MG $(LIBSRC) > $@)
|
$(strip $(CC) $(ALL_CPPFLAGS) $(LIB_CFLAGS) -MM -MG $(LIBSRC) > $@)
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifneq ($(MAKECMDGOALS),tar)
|
ifneq ($(MAKECMDGOALS),tar)
|
||||||
@ -74,4 +74,4 @@ $(lib)/$(SONAME) : proc/$(SONAME)
|
|||||||
|
|
||||||
|
|
||||||
proc/version.o: proc/version.c proc/version.h
|
proc/version.o: proc/version.c proc/version.h
|
||||||
$(CC) $(CFLAGS) $(LIBFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -c -o $@ $<
|
$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LIBFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -c -o $@ $<
|
||||||
|
@ -20,14 +20,14 @@ PS_X := COPYING HACKING TRANSLATION common.h module.mk it p ps.1 regression
|
|||||||
TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
|
TARFILES += $(PSSRC) $(addprefix ps/,$(PS_X))
|
||||||
|
|
||||||
ps/ps: $(PSOBJ) $(LIBPROC)
|
ps/ps: $(PSOBJ) $(LIBPROC)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^
|
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
# This just adds the stacktrace code
|
# This just adds the stacktrace code
|
||||||
ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
|
ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
|
||||||
$(CC) -o $@ $^ -lefence
|
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -o $@ $^ -lefence
|
||||||
|
|
||||||
$(PSOBJ): %.o: %.c ps/common.h proc/$(SONAME)
|
$(PSOBJ): %.o: %.c ps/common.h proc/$(SONAME)
|
||||||
$(CC) -c $(CFLAGS) $< -o $@
|
$(CC) -c $(ALL_CPPFLAGS) $(ALL_CFLAGS) $< -o $@
|
||||||
|
|
||||||
ps/stacktrace.o: ps/stacktrace.c
|
ps/stacktrace.o: ps/stacktrace.c
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user