Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Issue 6929022: pnacl's newlib code contains function that can/should not be called (Closed)

Created:
9 years, 7 months ago by robertm
Modified:
9 years, 6 months ago
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

The newlib code contains quite few functions that cannot be linked into a program because they have in turn unmet dependencies. Cleaning those up is desirably because this allows us to start experimenting with PNaCl's shared infrastructure while working on the glibc port. This CL describes the problematic modules in newlib by showing how to edit various "Makefile.in"s. This is NOT the right way of doing this, e.g. the real change would have to happen in Makefile.am, etc. So this CL is also a request for proposals how to go about this. Below is an overview of the problematic modules: * libc/signal: should be completely excluded * libc/posix: exec stuff and globbing should be excluded * libc/reent: signal, file manipulation, etc should be excluded * libc/search: hash table code (uses tmp files and page tables manip) should be excluded * libc/stdio: file manipulation, tmp file stuff should be excluded * libc/stdlib: system() should be excluded * libm/math: this is a special case: wf_sqrt.c w_sqrt.c should be excluded as they are redefined/overloaded in libm/machine/pnacl/ BUG= http://code.google.com/p/nativeclient/issues/detail?id=1754

Patch Set 1 #

Patch Set 2 : update #

Patch Set 3 : update #

Patch Set 4 : update #

Patch Set 5 : update #

Total comments: 1

Patch Set 6 : cleanup #

Patch Set 7 : patch #

Patch Set 8 : update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -394 lines) Patch
M newlib-trunk/newlib/libc/Makefile.am View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M newlib-trunk/newlib/libc/Makefile.in View 1 2 3 4 5 6 3 chunks +7 lines, -4 lines 0 comments Download
M newlib-trunk/newlib/libc/posix/Makefile.am View 1 2 3 4 5 6 7 1 chunk +9 lines, -4 lines 0 comments Download
M newlib-trunk/newlib/libc/posix/Makefile.in View 1 2 3 4 5 6 7 5 chunks +37 lines, -100 lines 0 comments Download
M newlib-trunk/newlib/libc/reent/Makefile.am View 1 2 3 2 chunks +14 lines, -8 lines 0 comments Download
M newlib-trunk/newlib/libc/reent/Makefile.in View 1 2 3 4 5 6 10 chunks +27 lines, -73 lines 0 comments Download
M newlib-trunk/newlib/libc/search/Makefile.am View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M newlib-trunk/newlib/libc/search/Makefile.in View 1 2 3 4 5 6 5 chunks +7 lines, -98 lines 0 comments Download
M newlib-trunk/newlib/libc/stdio/Makefile.am View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M newlib-trunk/newlib/libc/stdio/Makefile.in View 1 2 3 4 5 6 9 chunks +20 lines, -40 lines 0 comments Download
M newlib-trunk/newlib/libc/stdlib/Makefile.am View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M newlib-trunk/newlib/libc/stdlib/Makefile.in View 1 2 3 4 5 6 5 chunks +10 lines, -16 lines 0 comments Download
M newlib-trunk/newlib/libm/math/Makefile.am View 1 2 3 4 5 4 chunks +10 lines, -2 lines 0 comments Download
M newlib-trunk/newlib/libm/math/Makefile.in View 1 2 3 4 5 6 11 chunks +37 lines, -42 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
robertm
PTAL
9 years, 7 months ago (2011-05-04 21:50:52 UTC) #1
pdox
robert, This is probably not the right way to do this. There must be a ...
9 years, 7 months ago (2011-05-04 22:06:22 UTC) #2
robertm
Pdox, The existing mechanism seems to work but it is a hack of sorts as ...
9 years, 7 months ago (2011-05-04 22:16:59 UTC) #3
robertm
I just uploaded the bigger change to newlib that contains hopefully all the problematic modules. ...
9 years, 7 months ago (2011-05-05 16:26:46 UTC) #4
pdox
Robert, This is still not the right way to do this. This will be a ...
9 years, 7 months ago (2011-05-05 16:32:59 UTC) #5
robertm
Pdox, I am well aware of this (c.f. the new description). I was hoping to ...
9 years, 7 months ago (2011-05-05 16:48:15 UTC) #6
jvoung - send to chromium...
Robert, So the issue with the others (non-libm/machine) is that the unmet dependencies aren't normally ...
9 years, 7 months ago (2011-05-05 18:46:09 UTC) #7
robertm
On 2011/05/05 18:46:09, jvoung wrote: > Robert, > > So the issue with the others ...
9 years, 7 months ago (2011-05-05 19:01:25 UTC) #8
robertm
I made my changes to the actual Makefile.am files and then regenerated the Makefile.in files ...
9 years, 7 months ago (2011-05-06 22:11:25 UTC) #9
Use chromium.org instead
I imagine you actually ran "autoreconf" or "automake", since automake is what reads Makefile.am files. ...
9 years, 7 months ago (2011-05-06 22:17:46 UTC) #10
robertm
I have not heard from anybody in two day, so I assume this change is ...
9 years, 7 months ago (2011-05-10 18:00:27 UTC) #11
jvoung - send to chromium...
I guess it doesn't make much sense to have these unusable functions... Some thoughts about ...
9 years, 7 months ago (2011-05-10 21:25:36 UTC) #12
pdox
robertm, I really don't like this CL. I don't understand what you are trying to ...
9 years, 7 months ago (2011-05-11 15:40:27 UTC) #13
robertm
On 2011/05/11 15:40:27, pdox wrote: > robertm, > > I really don't like this CL. ...
9 years, 7 months ago (2011-05-11 16:13:22 UTC) #14
sehr (please use chromium)
9 years, 7 months ago (2011-05-11 16:45:01 UTC) #15
On 2011/05/11 16:13:22, robertm wrote:
> On 2011/05/11 15:40:27, pdox wrote:
> > robertm,
> > 
> > I really don't like this CL. I don't understand what you are trying to
> > accomplish here. We are not going to be turning archives into .so's. The way
> to
> > create bitcode shared objects will be exactly like creating normal shared
> > objects... using pnacl-ld -shared, not pnacl-ar.
> 
> Pdox,
> 
> Leaving your concerns about the linking issues aside.
> This CL is pruning stuff from newlib that cannot be called anyway
> without incurring link-time errors.
> I think this alone is a good enough justification.
> Maintaining these changes should be rather trivial as well.
> 
> What concretely is it that you do not like about this CL?
> 
> Robert
> 
> 
> > 
> > Also, why bother? As far as I know, we are not planning on turning newlib
into
> a
> > shared library. We'll be using glibc for our libc.so. newlib will only ever
be
> > used for static linking, and thus always in .a form.

While I have some other concerns I have expressed regarding the use of archivers
rather than linkers for producing .sos, this change seems unrelated and
generally acceptable.  LGTM.

Powered by Google App Engine
This is Rietveld 408576698