On 13.07.2007 [18:14:55 -0400], Mike Frysinger wrote:
> this patch to the Makefile:
>       - respect env CFLAGS/LDFLAGS/CPPFLAGS
>       - add proper SONAME to shared libs
>       - make "install" target depend on "libs", not "all" otherwise test gets 
> forced ... this allows package maintainers to split the test/install steps up 
> properly in their distribution
> -mike

> --- Makefile
> +++ Makefile

-p1 please?

> @@ -13,9 +13,10 @@
>  
>  INSTALL = install
>  
> -LDFLAGS = --no-undefined-version -Wl,--version-script=version.lds
> -CFLAGS = -O2 -Wall -fPIC -g
> -CPPFLAGS = -D__LIBHUGETLBFS__
> +LDFLAGS += --no-undefined-version -Wl,--version-script=version.lds

Seems good.

> +CFLAGS ?= -O2 -g
> +CFLAGS += -Wall -fPIC

Why the difference between ?= and += here?
Ah, one says, if CFLAGS is already set (meaning optimization levels,
etc, most likely), don't change it (but do so, if it is unset) and the
other says always add these two options

Seems sensible then.

> +CPPFLAGS += -D__LIBHUGETLBFS__

Yep.

>  ARCH = $(shell uname -m | sed -e s/i.86/i386/)
>  
> @@ -145,11 +146,11 @@
>  
>  obj32/libhugetlbfs.so: $(LIBOBJS:%=obj32/%)
>       @$(VECHO) LD32 "(shared)" $@
> -     $(CC32) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
> +     $(CC32) $(LDFLAGS) -Wl,-soname,$@ -shared -o $@ $^ $(LDLIBS)
>  
>  obj64/libhugetlbfs.so: $(LIBOBJS:%=obj64/%)
>       @$(VECHO) LD64 "(shared)" $@
> -     $(CC64) $(LDFLAGS) -shared -o $@ $^ $(LDLIBS)
> +     $(CC64) $(LDFLAGS) -Wl,-soname,$@ -shared -o $@ $^ $(LDLIBS)

Makes sense. What is the functional change here, though? That is what
does having a proper "soname" do? (I've looked at the ld manpage, but
it's still not quite clear).

>  obj32/%.i:   %.c
>       @$(VECHO) CPP $@
> @@ -206,7 +206,7 @@
>       @$(VECHO) OBJSCRIPT $*
>       sed "s!### SET DEFAULT LDSCRIPT PATH HERE 
> ###!HUGETLB_LDSCRIPT_PATH=$(LDSCRIPTDIR)!" < $< > $@
>  
> -install: all $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%)
> +install: libs $(OBJDIRS:%=%/install) $(INSTALL_OBJSCRIPT:%=objscript.%)

Yep, especially given there is a separate install-tests target.

If you could resubmit with a Signed-off-by line and in -p1 format, I'll
apply the patch and it will be in the next release (I expect to be ready
for 1.2-rc1 soon).

Does this mean libhugetlbfs will be available via portage?

Thanks,
Nish

-- 
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to