fix warnings; put CFLAGS on lib link command

This commit is contained in:
albert 2004-09-23 13:41:33 +00:00
parent 3353f0f8fe
commit 0586dc8b6d
6 changed files with 26 additions and 10 deletions

View File

@ -103,6 +103,7 @@ ALL_LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),tar)
ifneq ($(MAKECMDGOALS),extratar)
ifneq ($(MAKECMDGOALS),beta)
# Unlike the kernel one, this check_gcc goes all the way to
# producing an executable. There might be a -m64 that works
@ -139,6 +140,7 @@ ALL_CFLAGS += $(call check_gcc,-fno-inline-functions,)
endif
endif
endif
endif
############ misc.
@ -148,7 +150,7 @@ endif
.SUFFIXES:
.SUFFIXES: .a .o .c .s .h
.PHONY: all clean do_all install tar extratar
.PHONY: all clean do_all install tar extratar beta
ALL := $(notdir $(BINFILES))
@ -197,6 +199,12 @@ extratar: $(_TARFILES)
tar cf extra-$(TARVERSION).tar procps-$(TARVERSION)
gzip -9 extra-$(TARVERSION).tar
beta: $(TARFILES) $(_TARFILES)
mkdir beta-$(TARVERSION)
(tar cf - $(TARFILES) $(_TARFILES)) | (cd beta-$(TARVERSION) && tar xf -)
tar cf beta-$(TARVERSION).tar beta-$(TARVERSION)
gzip -9 beta-$(TARVERSION).tar
clean:
rm -f $(CLEAN)

View File

@ -141,6 +141,7 @@ static const char low_density_names[][4] = {
"DB0", "DB1", "DB2", "DB3", "DB4", "DB5", "DB6", "DB7",
"SG0",
"SMX0", "SMX1", "SMX2",
"MM0", "MM1",
};
/* Try to guess the device name (useful until /proc/PID/tty is added) */

View File

@ -105,8 +105,8 @@
*/
typedef struct symb {
const char *name;
unsigned KLONG addr;
const char *name;
} symb;
/* These mostly rely on POSIX to make them zero. */

View File

@ -76,7 +76,7 @@ proc/$(ANAME): $(LIBOBJ)
#proc/$(SONAME): proc/library.map
proc/$(SONAME): $(LIBOBJ)
$(CC) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc
$(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc
# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT
@ -86,10 +86,12 @@ proc/.depend: $(LIBSRC) $(LIBHDR)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),tar)
ifneq ($(MAKECMDGOALS),extratar)
ifneq ($(MAKECMDGOALS),beta)
-include proc/.depend
endif
endif
endif
endif
#################### install rules ###########################

View File

@ -70,6 +70,13 @@ typedef struct proc_t {
sigignore, // status mask of ignored signals
sigcatch; // status mask of caught signals
#endif
unsigned KLONG
start_code, // stat address of beginning of code segment
end_code, // stat address of end of code segment
start_stack, // stat address of the bottom of stack for the process
kstk_esp, // stat kernel stack pointer
kstk_eip, // stat kernel instruction pointer
wchan; // stat (special) address of kernel wait channel proc is sleeping in
long
priority, // stat kernel scheduling priority
nice, // stat standard unix nice level of process
@ -100,13 +107,6 @@ typedef struct proc_t {
maj_flt, // stat number of major page faults since process start
cmin_flt, // stat cumulative min_flt of process and child processes
cmaj_flt; // stat cumulative maj_flt of process and child processes
unsigned KLONG
start_code, // stat address of beginning of code segment
end_code, // stat address of end of code segment
start_stack, // stat address of the bottom of stack for the process
kstk_esp, // stat kernel stack pointer
kstk_eip, // stat kernel instruction pointer
wchan; // stat (special) address of kernel wait channel proc is sleeping in
char
**environ, // (special) environment string vector (/proc/#/environ)
**cmdline; // (special) command line string vector (/proc/#/cmdline)

View File

@ -708,8 +708,13 @@ static const char *generate_sysv_list(void){
}else if(format_flags & FF_Ul){
PUSH("ni"); PUSH("opri");
}
// FIXME TODO XXX -- this is a serious problem
// These somehow got flipped around.
// The bug is in procps-3.1.1, procps-990211, prior too?
if((thread_flags & TF_U_L) && (format_flags & FF_Uf)) PUSH("nlwp");
if( (format_flags & (FF_Uf|FF_Ul)) && !(format_modifiers & FM_c) ) PUSH("c");
if(format_modifiers & FM_P) PUSH("psr");
if(thread_flags & TF_U_L) PUSH("lwp");
if(format_modifiers & FM_j){