TEA (tclconfig) Source Code

Check-in [83845d507e]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Experimental build. Changes the way binaries are linked by using more data from tclConfig.in
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | practcl
Files: files | file ages | folders
SHA3-256: 83845d507e4634009514132e168eefb561f354c651bbd1b709aed98123d7860c
User & Date: root 2017-11-28 11:36:39
Context
2017-11-28
11:47
Improvement to prevent -framework calls from being filtere d check-in: c685935d22 user: root tags: practcl
11:36
Experimental build. Changes the way binaries are linked by using more data from tclConfig.in check-in: 83845d507e user: root tags: practcl
2017-11-27
17:45
Updating to the latest practcl check-in: dd0d9fad47 user: hypnotoad tags: practcl
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to practcl.tcl.

2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129

















2130
2131
2132
2133

2134
2135
2136
2137
2138
2139
2140

2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152





2153

2154
2155
2156
2157
2158
2159
2160
2161
2162
      file copy -force $RCSRC [file join $path [file tail $RCSRC]]
    }
    if {![file exists [file join $path [file tail $RCMAN]]]} {
      file copy -force $RCMAN [file join $path [file tail $RCMAN]]
    }
    ::practcl::doexec {*}$cmd
    lappend OBJECTS $RSOBJ
    set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc}
    set LDFLAGS_WINDOW  {-mwindows -pipe -static-libgcc}
  } else {
    set LDFLAGS_CONSOLE {}
    set LDFLAGS_WINDOW  {}
  }
  puts "***"
  if {$debug} {
    set cmd "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_debug) \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"
  } else {
    set cmd "$TCL(cc) $TCL(shlib_cflags) $TCL(cflags_optimize) \
$TCL(cflags_warning) $TCL(extra_cflags) $INCLUDES"
  }
  append cmd " $OBJECTS"
  append cmd " $EXTERN_OBJS "
  # On OSX it is impossibly to generate a completely static
  # executable
  if {[$PROJECT define get TEACUP_OS] ne "macosx"} {
    append cmd " -static "
  }
  if {$debug && $os eq "windows"} {
    append cmd " -L${TCL(src_dir)}/win -ltcl86g"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L${TK(src_dir)}/win -ltk86g"
    }
  } else {
    append cmd "\n $TCL(build_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd  "\n $TK(build_lib_spec)"

















    }
  }
  foreach obj $PKG_OBJS {
    append cmd "\n [$obj linker-products $config($obj)] "

  }
  append cmd "\n $TCL(libs) "
  if {[$PROJECT define get static_tk]} {
    append cmd "\n $TK(libs) "
  }
  foreach obj $PKG_OBJS {
    append cmd "\n [$obj linker-external $config($obj)]"

  }
  if {$debug && $os eq "windows"} {
    append cmd "\n -L${TCL(src_dir)}/win ${TCL(stub_lib_flag)}"
    if {[$PROJECT define get static_tk]} {
      append cmd "\n -L${TK(src_dir)}/win ${TK(stub_lib_flag)}"
    }
  } else {
    append cmd "\n $TCL(build_stub_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd "\n $TK(build_stub_lib_spec)"
    }
  }





  append cmd "\n -o $outfile $LDFLAGS_CONSOLE"

  puts "LINK: $cmd"
  exec {*}[string map [list "\n" " "] $cmd] >&@ stdout
}

}

###
# END: class toolset gcc.tcl
###






|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<





|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|
>
|
<
<
<

<
<
>
|

|

|


|

|


>
>
>
>
>
|
>

|







2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118



2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149



2150


2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
      file copy -force $RCSRC [file join $path [file tail $RCSRC]]
    }
    if {![file exists [file join $path [file tail $RCMAN]]]} {
      file copy -force $RCMAN [file join $path [file tail $RCMAN]]
    }
    ::practcl::doexec {*}$cmd
    lappend OBJECTS $RSOBJ
  }
  puts "***"
  set cmd "$TCL(cc)"
  if {$debug} {
   append cmd " $TCL(cflags_debug)"
  } else {
   append cmd " $TCL(cflags_optimize)"
  }
  append cmd " $TCL(ld_flags)"
  if {$debug} {
   append cmd " $TCL(ldflags_debug)"
  } else {
   append cmd " $TCL(ldflags_optimize)"
  }

  append cmd " $OBJECTS"
  append cmd " $EXTERN_OBJS"
  if {$debug && $os eq "windows"} {
    append cmd " -static"



    append cmd " -L${TCL(src_dir)}/win -ltcl86g"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L${TK(src_dir)}/win -ltk86g"
    }
  } else {
    append cmd " $TCL(build_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd  " $TK(build_lib_spec)"
    }
  }
  foreach obj $PKG_OBJS {
    append cmd " [$obj linker-products $config($obj)]"
  }
  set LIBS {}
  foreach item $TCL(libs) {
    if { $item ni $LIBS } { lappend LIBS $item }
  }
  if {[$PROJECT define get static_tk]} {
    foreach item $TK(libs) {
      if { $item ni $LIBS } { lappend LIBS $item }
    }
  }
  if {[info exists TCL(extra_libs)]} {
    foreach item $TCL(extra_libs) {
      if { $item ni $LIBS } { lappend LIBS $item }
    }
  }
  foreach obj $PKG_OBJS {
    foreach item [$obj linker-external $config($obj)] {
      if { $item ni $LIBS } { lappend LIBS $item }
    }



  }


  append cmd " ${LIBS}"

  if {$debug && $os eq "windows"} {
    append cmd " -L${TCL(src_dir)}/win ${TCL(stub_lib_flag)}"
    if {[$PROJECT define get static_tk]} {
      append cmd " -L${TK(src_dir)}/win ${TK(stub_lib_flag)}"
    }
  } else {
    append cmd " $TCL(build_stub_lib_spec)"
    if {[$PROJECT define get static_tk]} {
      append cmd " $TK(build_stub_lib_spec)"
    }
  }
  append cmd " $TCL(cc_search_flags) "
  append cmd " -o $outfile "
  if {$os eq "windows"} {
    set LDFLAGS_CONSOLE {-mconsole -pipe -static-libgcc}
    set LDFLAGS_WINDOW  {-mwindows -pipe -static-libgcc}
    append cmd " $LDFLAGS_CONSOLE"
  }
  puts "LINK: $cmd"
  exec {*}[string map [list "\n" " " "  " " "] $cmd] >&@ stdout
}

}

###
# END: class toolset gcc.tcl
###