Also fixed up CC/CXX/CXXFLAGS in the same way.
Main notable concern the tclmagic.so now has reordered position of
$LDFLAGS (was start AND end of list, now start of list only),
$LDDL_FLAGS would have already provided it start of list, so it
would be duplicated set of options.
@LDDL_FLAGS@ no longer prepend $LDFLAGS which is now explicit in the
Makefile to allow specific target control.
The purpose of all this is the toplevel ./configure now has LDFLAGS
control passed down to linker command lines as configure --help
indicates.
CoPilot analysis
Bonus: fetch-tags workaround may be removable
The appimage workflows have this comment throughout:
#fetch-tags: true # this should work see actions/checkout~issue#1471
...and then manually run git fetch --tags as a workaround. The fetch-tags input bug referenced
in issue #1471 was fixed in a v4.x patch release. After upgrading to v7, it would be worth
testing fetch-tags: true directly and removing the manual git fetch --tags workaround in the
appimage "Create RELEASE-NOTES.txt" steps — though this is independent of the version upgrade
itself.
Previously it was an archive of an archive (of the 'npm pack' output)
published under the same artifict filename (which becomes the default
download filenmame) which is a headache when you start to download more
than one (like when testing between versions).
Now the 'npm pack' output is attached as-is using its original filename,
but also the extracted contents are attached as standard GitHub
artifact ZIP, using a unique filename (based on the unique build version).
Filter out unwanted tag version as candiates to build with:
refs/tags/core-9-0-b3 UNWANTED
refs/tags/core-9-0-b2 UNWANTED
refs/tags/core-9-0-b1-rc4 UNWANTED
refs/tags/core-9-0-b1 UNWANTED
refs/tags/core-9-0-a3 UNWANTED
refs/tags/core-9-0-a1 UNWANTED
refs/tags/core-9-0-4
refs/tags/core-9-0-3
refs/tags/core-9-0-2
refs/tags/core-9-0-1
refs/tags/core-9-0-0
Previously the lexical order would result in alpha/beta/rc
matching in preference to the stable Tcl version IDs. So our WASM
build would not be against the upstream stable release which is
the intention.
previously node20 was the default, with override to force node22 but
node24 has been out since May 2025 and is current LTS, with node26
out since May 2026 and current stable (but non-LTS).
non-default rule, but then does not contain any routed nets, the
non-default rule gets accidentally applied to the next routed net,
ignoring the end-of-statement in between.
regions into extHardFreeAll(), where it is easy to detect if it has
already been freed along with the rest of the labeled regions, to avoid
a double free() call.
documentation implied that "findlabel -glob <pattern> <n>" is a
meaningful set of command options, but in fact was not implemented
and did not raise an error for wrong number of arguments. Instead,
this has now been implemented to mean find (and set the box position
to) the <n>th label containing <pattern>.
extFindNodes() is called to find just the substrate node, then
ExtLabelRegions() is called to label the substrate node if such a label
exists. The ExtLabelRegions() routine has a section at line 344 in which
if it finds a label on the substrate plane that is over space, then it
attaches the label to the default substrate region. However, if the
label is inside an isolated substrate region, then it passes this check,
which never actually detects whether or not the label is over space.
Doing so is actually simple, since the preceding code detected connecting
tiles under the label, and that fact just needed to be carried forward
and checked. The upshot of the error was that if an isolated substrate
region like a pwell inside deep nwell was *labeled*, then it would
mysteriously get shorted to the global substrate, which is clearly wrong.
Thanks to Mark Martin for providing the failing example (and apologies to
Mark Martin for spending time trying to debug a very obscure problem).
original implementation (which was added recently) used an inverted
output scale and multiplied by it instead of dividing by it,
resulting in incorrect units. However, it was not even getting to
that point due to the use of uninitialized variable "crec", which
should have been set from the window pointer but was missing.
Follow-up to review-master-upstream-20249999-oa-dcff2f64-6535a4e1.md:
- strcpy_s: add an inline fallback implementation right after the declaration,
guarded by #ifndef __STDC_LIB_EXT1__. glibc never defines that macro and does
not provide the C11 Annex K interfaces, so the bare declaration was an
unresolved symbol at link time; the fallback makes magicOA.o self-contained
(strcpy_s becomes a defined symbol) while a real Annex K libc still wins.
- magicInit.cpp / magicOA.cpp: use `char argvbuf[] = "tclsh"` for the mutable
argv string instead of `char[32]` + snprintf.
degenerate cases when attempting to find resistors in triangle
topologies in ResMerge, which fixes the segfault in github issue
diagnostic message. The other fix is part of github issue #538,
which found an error in the check for tied transistor sources and
drains. However, the other part of that issue, having to do with
nondeterminism in the "extresist" output, has not yet been addressed.
after much discussion about the implementation. Since it is not
exactly clear what the field lines do at corners, the implementation
depends largely on an unknown and presumably global constant
multiplier; this has provisionally been set to 1 but needs to be
determined empirically with a field equation solver. At least one
rational approximation suggests a value of pi/2 instead of 1. The
corner capacitance can be considered a refinement of existing
parasitic capacitance extraction, and since it takes a non-trivial
additional amount of computation, it is left as an option to
"extract" that can be turned on when a more accurate result is
preferred at the expense of a longer extraction time.
can become corrupted if the name of the cell in magic changes from
the name of the structure in GDS pointed to by the GDS_FILE property,
and the new name is a different length from the original name.
Fixed by Claude Fable 5 and checked for all name-change scenarios
for both compressed and uncompressed output.
In GCC <= 14, flexible arrays are not supported in unions because of a parserlimitation.
This is a hack that declares an anonymous struct, which itself can contain a flexible array but still be a member of a union. Another empty element is included because structs that only contain a flexible array are also invalid.
In platforms with bounds-checking enabled, placeholder values for array sizes in structs that may be exceeded always result in a sigtrap.
This patch updates the following classes to use flexible arrays at the end of structs:
- database
- Label
- PropertyRecord (union of three flexible arrays and a pointer*)
- cellUE
- extflat
- HierName
- EFAttr
- Dev
- utils
- HashEntry (union of two flexible arrays and a pointer*)
- internalUndoEvent: Was a plain int, replaced with a flexible char array
Additionally, the database struct editUE, which would have just a single flexible-array member, was removed and simply replaced with a character pointer.
Where possible, allocation size macros have been introduced.
---
* It is noted flexible-length arrays as part of unions are not part of the C language spec and are a GNU99 extension, however, it is supported by both GCC and Clang.
a resistor subnet has been linked to itself (or something like that).
Otherwise it leads to a double-free and a crash. This commit does
not address why the subnet was linked to itself, and the crash was
preceded by another internal diagnostic message "Missing rptr at ..."
which has been noted before but still needs to be tracked down and
fixed. It is likely that a bad output netlist was created, but at
least magic doesn't segfault.
capacitance of a resistor device between the two terminals. If
the resistor device model contains the capacitance, then the
resistor type should not be included in types that generate
parasitics. If not, then the "pi" model is used. The "tee" model
is still available using "ext2spice resistor tee on". What this
update does is to default to the "pi" model instead of ignoring
the capacitance of the resistor type (e.g., "rm1"), and because
the capacitance of that node is removed after distributing it
between the two terminals, it will no longer produce a "floating"
node in the netlist output.
reading a resistor device which uses the syntax where the resistor
is given a value directly and not as a parameter; (2) allow the
use of "extresist minres 0" (allow resistors in the output no
matter how small). Thanks to Torleif Skaar for finding the issue
with the resistor syntax.
"progress report" of percent completion on certain long-running
processes (namely extraction, DEF reads, and GDS/CIF writes) was
allowing Tcl/Tk events to be processed so that the display would
be repainted and the console window updated to show the progress
instead of hanging. But that was allowing any key macros or
commands to be entered and executed, potentially corrupting the
database while the process was running. I have used
Tk_RestrictEvents() to prevent key and button events from being
processed until afterward. This preserves the display updates
(which do not alter the database) while preventing commands from
being run during one of these long-running processes. Also:
Previously, whenever a long-running process printed the status,
it would not update at the end, leaving output like "52% complete"
being the last output, leaving the impression that the process
never finished. Changed the code so that if any partial progress
is printed, then it will always finish up with the output "100%
complete" so that it is clear to the user that everything went
according to plan.