| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This reverts commit 0d55a45a6f024919f13cbe70fc861f5eb6d757ee.
|
|
|
|
|
|
|
|
| |
(1) It doesn't mean "strict C89" on its own, -pedantic would also be needed.
(2) Using C99 features like long long or inline becomes harder.
The downside of this change is that C99-isms can more easily
creep into the core code, breaking it for non-gcc C89 compilers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
% cat ~/t.pl
print ( (q{foo'} =~ /[^']+'/) ? "ok\n" : "not ok\n" );
% perl ~/t.pl
ok
% ./miniperl ~/t.pl
not ok
This only happens with -fPIC -ftree-vrp builds.
It is a regression from gcc-4.8.
Bug-Debian: http://bugs.debian.org/754054
Patch-Name: debian/regcomp-mips-optim.diff
|
| |
|
|
|
|
|
|
| |
Logical revert of b679cac0, but redone.
Apple versions only for now; situation on Linux side unknown.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The core was already -pedantic clean (with default config, with
DEBUGGING almost), cflags just needed some juggling, somewhat
complicated by the logic of -Werror=declaration-after-statement.
Still requires -Dgccansipedantic to enable the -pedantic because
otherwise we do not use things like gcc brace groups and C99 variadic
macros, which are nice. Also, see below about usedtrace complications.
(the gccansipedantic logic was odd, probably not used for a while.)
Under -DDEBUGGING the -pedantic requires quieting the warnings
about overlong string literals.
Disable -pedantic et al if usedtrace is enabled, it uses too many
non-standard features (and it depends on code generated by an external
framework).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Has been AFAICT for years / always, the documentation just
had it wrong in pre-4.0 gccs.
|
|
|
|
|
| |
For C89 compliancy, this is the most common thinko people make.
While waiting for -pedantic -std=c89, which will catch the same.
|
| |
|
|
|
|
| |
"clean" as in "not needed anymore".
|
|
|
|
|
|
| |
Another possibility is that clang has become smarter,
and that needs to be made dependent on clang version.
But for now, let's opt for simplicity and less logic.
|
| |
|
|
|
|
|
|
|
|
| |
(Except for the possible toke_cflags customizations.)
Do the -Wno-unused-... edits only if -Wall.
Echo the edits done during extraction time, to make the magic more visible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- after return/croak/die/exit, return/break are pointless
(break is not a terminator/separator, it's a goto)
- after goto, another goto (!) is pointless
- in some cases (usually function ends) introduce explicit NOT_REACHED
to make the noreturn nature clearer (do not do this everywhere, though,
since that would mean adding NOT_REACHED after every croak)
- for the added NOT_REACHED also add /* NOTREACHED */ since
NOT_REACHED is for gcc (and VC), while the comment is for linters
- declaring variables in switch blocks is just too fragile:
it kind of works for narrowing the scope (which is nice),
but breaks the moment there are initializations for the variables
(the initializations will be skipped since the flow will bypass
the start of the block); in some easy cases simply hoist the declarations
out of the block and move them earlier
Note 1: Since after this patch the core is not yet -Wunreachable-code
clean, not enabling that via cflags.SH, one needs to -Accflags=... it.
Note 2: At least with the older gcc 4.4.7 there are far too many
"unreachable code" warnings, which seem to go away with gcc 4.8,
maybe better flow control analysis. Therefore, the warning should
eventually be enabled only for modernish gccs (what about clang and
Intel cc?)
|
|
|
|
| |
"unknown warning option" (for -W...) or "unknown argument" (for -...).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current UNIX build system does a strange thing to generate the
appropriate command-line to compile a particular src file. It calls
the cflags shell script, which
1) echoes to stdout the command line needed to compile the specified
file (excluding the name of the src file itself), e.g.
cc -c -Dfoo -Wbar ...
2) echoes the same thing to stderr, prefixied with ' CCCMD ='
Make then does
`sh cflags foo.o` foo.c
the cflags output to stdout is captured by the backticks, and is used
by make as the command line to run (with the foo.c appended). This run is
silent. The output to stderr isn't captured, and gets displayed. So the
user sees:
$ make
`sh cflags foo.o` foo.c
CCCMD = cc -c -Dfoo -Wbar ...
...
This is annoying for 2 reasons:
1) you don't get a simple command-line displayed which you could do a
simple cut and paste with (e.g. when you want to recompile a specific
source file, but alter the flags).
2) The make generates output on stderr, even when then there aren't any
errors. So "make 2>errs" can't be used to quickly spot warnings and
errors.
This commit fixes this by making cflags just output the cc command and
flags to stdout, then get Makefile to call it twice, once to echo
the command-line (on stdout), and once to execute it with backticks.
So the make output is now:
$ make
cc -c -Dfoo -Wbar ... foo.c
...
There is some stuff in Makefile.SH related to cross-compiling, which this
commit make have broken. Specifically the CCCMD and CCCMDSRC macros
have been changed in the normal case to remove backticks (and add them to
the make rules instead), but not for the cross compilation route.
The CC* defs in the cross-compilation case have a trailing -I$(CROSS_LIB)
outside of the backticks, which compilates matters.
However, in the subdir Cross/, there appears to be separate (and
divergent) copies of Makefile.SH and cflags, so maybe the files
I edited are no longer used for cross-compilation????
(followup: according to
<20131204170112.GA2490@iabyn.com>
the cross-compiling stuff I mentioned above has bit-rotted, and I don't
need to worry about it)
|
|
|
|
|
|
|
|
|
| |
These scripts had a mixture of old-style ':' comments and new-style
'#' comments. Since they have both, the old ones can't be needed for
portability reasons, so standardise on the modern form.
The old-style were just too confusing, especially as my syntax highlighter
didn't know about them.
|
|
|
|
|
|
| |
Add comments to the top of cflags.SH to explain what it does.
Also make it output comments at the top of the generated cflags
script explaining that its auto-generated.
|
|
|
|
|
| |
This went undetected for the longest time since most flags are
irrelevant at this point, but is vital if you are using --sysroot.
|
|
|
|
|
|
|
| |
We already have an exception for it when called as clang or clang-1.2.3,
but not when called as cc or anything else. Mac OS X Mountain Lion
therefore ends up spitting out lots of warnings, as cc is a symlink
to clang.
|
|
|
|
| |
clang++ or clang-3.2, ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This permits test code to include the perl headers for definitions without
creating a link dependency on the perl library (which may not exist yet).
Some of the static inline functions in inline.h reference functions in the
perl object files, and some compilers aren't smart enough to eliminate
unused static inline functions, hence including the inline.h in probe code
can cause link errors even though the probe code uses none of the functions
it declares. When probing, a failed link is taken as meaning that the
probed-for function is not present, as the assumption is that the link fails
because of it. Hence other causes of link failures cause the probing code to
generate incorrect results, and action (and bugs) at a distance.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add examples showing how to use cflags.SH to tweak the compiler flags used
for individual object files.
Previously cflags.SH contained a somewhat stale pre-canned list of file
basenames including removed files such as usersub (deleted before 5.000
shipped), and a partial list of 5.000 XS extensions. Whilst it's possible
to generate the correct list in cflags by parsing MANIFEST (and adding a few
fixups), it's still not actually *useful*, as cflags gets overwritten as
soon as config.sh changes. Hence the most end-user useful solution with
minimal maintenance is to eliminate the list entirely, and document how the
user should add to it as necessary.
|
| |
|
|
|
|
|
|
|
| |
All these files used to be executable in the release tarballs. Apparently things
also work without that in the repository, but I'd rather add this possibly
unecessary change to blead instead of breaking the upcoming release. This should
probably be looked into again afterwards.
|
|
|
|
|
|
| |
The perl source has for some while been clean to -Wwrite-strings.
I suggest this warning be added to cflags.
The patch makes the appropriate change to cflags.SH and silences a warning from mg.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When porting/makerel runs, all files copied into the directory for the
tarball have the executable bit stripped and then only a specific set of
files have the executable bit restored.
There are many files in the repo that have the executable bit set in the
repo that will be stripped. So that the state of files in the repo is
as close as possible to the state of files in the release tarball, the
executable bit has been stripped from such files.
In one recent case, a file added from a dual-life module needed the
executable bit set. Because it had the bit in the repo but was
not listed in makerel to get an executable bit, tests using it
passed in the repo and failed in the tarball.
This commit refactors the list into a new file, Porting/exec-bit.txt
and add tests to detect a mismatch between files listed there
and actual executable bits in the repo.
|
| |
|
|
|
|
| |
Rename the old "unpushed.h" to "git_version.h" and make it hold the defines that used to come from cflags magic
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The net result of this patch is to make available via Config.pm and -v/-V the
details about the git version info we have available for the build. When built within
a git repository git is queried directly. When built from a snapshot or bundle
it is assumed that the source is unchanged, and that the required details are
avaialble in a file called .patch, whose format current is a four field string
in the following format: "$branchname $date.$time $sha1 $describe". The
generator of these files currently resides on camel.booking.com.
* git-describe is now used more directly with -v.
When the prefix of git-describe matches the version number
as determined by the defines in patchlevel.h then we use ONLY
the git-describe output, otherwise we include
the git describe in parenthesis after the version number. Either way
the describe text is optionally followed by a star should there be
uncommitted changes.
eg: This is perl, v5.11.0 (GitLive-blead-136-g58ca560) built for i686-linux
or: This is perl, v5.11.0-1-g58ca560 built for i686-linux
or: This is perl, v5.11.0 built for i686-linux
* include the SHA1 in perl -V summary, and automatically include unpushed
commits in the registered patches list
* include various git/version/.patch details in %Config, as follows:
git_commit_id # sha1 of HEAD
git_ancestor # ancestor in $remote/$branch (presumably canonical)
git_describe # git describe
git_branch # current branch
git_uncommitted_changes # "true" if there are any, empty otherwise
git_unpushed_commits # List of sha1's of unpushed commits
git_commit_id_title # Used to make the perl -V summary output
Additionally one more value is added depending on build process used: when
building from an rsynced snapshot (or any dist including a file called
.patch) then the second field will be used to populate the
"git_snapshot_date" field. Otherwise if built in a git directory (as is hopefully
recommended these day) then the field will be "git_commit_date" which will be the
commit date of HEAD.
This patch introduces two new files (on top of .patchnum) that will be generated by
make_patchnum.sh: "lib/Config_git.pl" and "unpushed.h", the former is used to make
git data available to Config.pm/%Config without rebuilding everything else, and the
second is used to expose unpushed commits (if any) via the registered patch facility
of patchlevel.h
|
| |
|
|
|
|
| |
it only affects perl.c
|
|
|
|
| |
whenever cflags.SH changes
|
| |
|
|
|
|
|
|
| |
Change elsif to the correct "else if" construction.
I suspect that this slipped by into f6a80292c3db127d1561c118f409c1cffd1b55d9
because cflags.SH doesn't seem to be re-expanded if it's newer than cflags.
|
|
|
|
|
|
|
|
|
|
|
| |
This is just an initial attempt at getting something more useful into the -v / -V output.
Currently "patchlevel" is really "version", and PATCHNUM is just a special string added
to the patchlevel in perl.c via defines created by cflags.SH and its product file cflags,
which happens very early in the build process. This means that for committers the -v output
is likely to not be upto date unless they run make clean.
Anyway, IMO we should rethink a reasonable amount about how we do this, this is just a crude
step forward.
|
|
|
|
|
|
| |
and regexp reference counting is via the regular SV reference counting.
This was not as easy at it looks.
p4raw-id: //depot/perl@32804
|
|
|
|
|
|
| |
gcc link flags so that any implementation dependant libraries are also
linked in.
p4raw-id: //depot/perl@32669
|
|
|
|
|
| |
when possible.
p4raw-id: //depot/perl@32647
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09398B@exchsvr2.npl.ad.local>
p4raw-id: //depot/perl@32623
|
|
|
|
|
|
| |
Message-ID: <Pine.LNX.4.64.0710230817250.18303@fractal.phys.lafayette.edu>
Date: Tue, 23 Oct 2007 08:54:51 -0400 (EDT)
p4raw-id: //depot/perl@32181
|