diff options
Diffstat (limited to 'dist')
-rw-r--r-- | dist/gcc/Make-lang.in | 1 | ||||
-rw-r--r-- | dist/mcode/windows/shared.psm1 | 26 |
2 files changed, 15 insertions, 12 deletions
diff --git a/dist/gcc/Make-lang.in b/dist/gcc/Make-lang.in index 12c797999..7e2b66bb5 100644 --- a/dist/gcc/Make-lang.in +++ b/dist/gcc/Make-lang.in @@ -108,6 +108,7 @@ vhdl/default_pathes.ads: Makefile echo " \"lib/ghdl\";" >> tmp-dpathes.ads echo " Shared_Library_Extension : constant String :=">> tmp-dpathes.ads echo " \"$(VHDL_SOEXT)\";" >> tmp-dpathes.ads + echo " Default_Pie : constant Boolean := False;" >> tmp-dpathes.ads echo "end Default_Pathes;" >> tmp-dpathes.ads $(srcdir)/../move-if-change tmp-dpathes.ads $@ diff --git a/dist/mcode/windows/shared.psm1 b/dist/mcode/windows/shared.psm1 index d888b1059..20aa5d7da 100644 --- a/dist/mcode/windows/shared.psm1 +++ b/dist/mcode/windows/shared.psm1 @@ -106,20 +106,20 @@ function Format-VHDLSourceFile ) begin - { $State = 1 - $Version = switch ($Version) - { "87" { 87 } - "93" { 93 } - "02" { 2 } - "08" { 8 } - } + { $State = 0 + $VersionAsInt = switch ($Version) + { "87" { 87 } + "93" { 93 } + "02" { 2 } + "08" { 8 } + } } process { if ($InputObject -is [String]) { $Line = $InputObject.ToString() if ($Line.StartsWith("--START-V")) - { $State = switch ($Line.Substring(9, 2)) + { $State = switch ($Line.Substring(9, 2)) { "87" { 87 } "93" { 93 } "02" { 2 } @@ -128,19 +128,21 @@ function Format-VHDLSourceFile } elseif ($Line.StartsWith("--START-!V")) { if ($Line.Substring(10, 2) -eq $Version) - { $State = 2 } + { $State = -1 } } elseif ($Line.StartsWith("--END-V") -or $Line.StartsWith("--END-!V")) - { $State = 1 } + { $State = 0 } else - { if ($State -eq 1) + { if ($State -eq 0) { if ($Line.EndsWith("--V$Version")) { Write-Output $Line } elseif (-not (($Line -like "*--V??") -or ($Line.EndsWith("--!V$Version")))) { Write-Output $Line } } - elseif ($State -eq $Version) + elseif ($State -eq $VersionAsInt) { Write-Output $Line } + # else + # { Write-Host "Discard line: $Line" -ForegroundColor Red } } } else |