Difference between revisions of "Building"

From Syslinux Wiki
Jump to: navigation, search
(Add "relocate protected-mode code" patch that might solve booting some Chromebooks using Syslinux 6.03.)
(Re-order (sort) items. Add new item, "Not enough room for program headers".)
Line 1: Line 1:
* '''NASM 2.11.06''' has a bug which prevents Syslinux from building <!--
 
  --> correctly. Use other version of NASM <!--
 
  --> (e.g. 2.11.05, 2.11.08, among others).
 
* '''binutils 2.26''', as originally released upstream, has a <!--
 
  --> [https://sourceware.org/bugzilla/show_bug.cgi?id=19538 bug] <!--
 
  --> preventing Syslinux from building correctly. The bug in <!--
 
  --> bintuils 2.26 was resolved in a later commit.
 
 
* When building with '''glibc 2.23+''', the "major", "minor" and "makedev" <!--  
 
* When building with '''glibc 2.23+''', the "major", "minor" and "makedev" <!--  
 
   --> functions are defined in {{nowrap|"<tt>sys/sysmacros.h</tt>"}}. <!--  
 
   --> functions are defined in {{nowrap|"<tt>sys/sysmacros.h</tt>"}}. <!--  
Line 14: Line 7:
 
<!-- -->
 
<!-- -->
 
<!-- -->
 
<!-- -->
* Building Syslinux 6.03 with '''gcc5+''': <!--   
+
* If getting "''Not enough room for program headers''", try adding <!--
   --> <p> These patches related to gcc5+ are included in Syslinux 6.04-pre1 (released 2016Mar). </p> <!--  
+
  --> {{nowrap|1='<tt>--no-dynamic-linker</tt>'}} to the linker command line(s). <!--  
 +
  --> There might be other / better solutions / work-around methods. <!--
 +
   --> [[Contact|Feedback]] is appreciated. <!--
 +
  --><!--
 +
  --><!-- References:
 +
  --><!--  http://www.syslinux.org/archives/2017-February/025531.html
 +
  --><!--  http://bugs.debian.org/846679#10
 +
  --><!-- http://www.syslinux.org/archives/2017-April/025748.html "Cross-compilation patches" (Benoît Allard (irc: benallard))
 
   --><!-- -->
 
   --><!-- -->
 +
<!--  -->
 +
 +
<br />
 +
Patches already included in Syslinux 6.04-pre1 (released 2016Mar):
 +
 +
* Building Syslinux 6.03 with '''gcc5+''':
 
** [http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce gcc fix alignment]
 
** [http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce gcc fix alignment]
 
** [http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe don't guess sections' alignment]
 
** [http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe don't guess sections' alignment]
 
** [http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce?hp=9e0926bb338deb5c634ccb4ee29eb4577158cfdc ldlinux: Fix return pointer to local data]
 
** [http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce?hp=9e0926bb338deb5c634ccb4ee29eb4577158cfdc ldlinux: Fix return pointer to local data]
 
<!-- -->
 
<!-- -->
* Use [http://repo.or.cz/syslinux.git/patch/7d70885d22e4474407637026c1af12a253281407?hp=2d14923c02aa343f650a5bee128e9ea383a0ed59 -mno-red-zone for EFI] <!-- 
+
* Use [http://repo.or.cz/syslinux.git/patch/7d70885d22e4474407637026c1af12a253281407?hp=2d14923c02aa343f650a5bee128e9ea383a0ed59 -mno-red-zone for EFI]
  --> <p> The patch related to the so-called "red zone" is included in Syslinux 6.04-pre1 (released 2016Mar). </p>  <!--
+
  --><!-- -->
+
 
* Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). <!--   
 
* Syslinux 6.03 might fail to boot in some hardware (e.g. some Chromebooks). <!--   
 
   --> The patch [http://repo.or.cz/syslinux.git/patch/0a2dbb3392ee710838bea6bda80d4daad6b54780?hp=f1e95ca49902b5eda4c02275a69152d4834882d6 "relocate protected-mode code as intended"], <!--   
 
   --> The patch [http://repo.or.cz/syslinux.git/patch/0a2dbb3392ee710838bea6bda80d4daad6b54780?hp=f1e95ca49902b5eda4c02275a69152d4834882d6 "relocate protected-mode code as intended"], <!--   
Line 35: Line 39:
 
   --> <p> Testing Syslinux {{nowrap|6.04-pre1}} (or later) is recommended. </p>  <!--  
 
   --> <p> Testing Syslinux {{nowrap|6.04-pre1}} (or later) is recommended. </p>  <!--  
 
   --><!-- -->
 
   --><!-- -->
 +
 +
== Other ==
 +
* '''NASM 2.11.06''' has a bug which prevents Syslinux from building <!--
 +
  --> correctly. Use other version of NASM <!--
 +
  --> (e.g. 2.11.05, 2.11.08+, among others).
 +
* '''binutils 2.26''', as originally released upstream, has a <!--
 +
  --> [https://sourceware.org/bugzilla/show_bug.cgi?id=19538 bug] <!--
 +
  --> preventing Syslinux from building correctly. The bug in <!--
 +
  --> bintuils 2.26 was resolved in a later commit.
  
 
<!--  Keywords / terms to help search engines: -->
 
<!--  Keywords / terms to help search engines: -->

Revision as of 03:32, 26 April 2017

  • When building with glibc 2.23+, the "major", "minor" and "makedev" functions are defined in "sys/sysmacros.h". The patch "extlinux: pull in sys/sysmacros.h for major/minor/makedev", applied to Syslinux during 2016Apr, should help. Please note that not only Syslinux is affected by this change in glibc.
  • If getting "Not enough room for program headers", try adding '--no-dynamic-linker' to the linker command line(s). There might be other / better solutions / work-around methods. Feedback is appreciated.


Patches already included in Syslinux 6.04-pre1 (released 2016Mar):

Other

  • NASM 2.11.06 has a bug which prevents Syslinux from building correctly. Use other version of NASM (e.g. 2.11.05, 2.11.08+, among others).
  • binutils 2.26, as originally released upstream, has a bug preventing Syslinux from building correctly. The bug in bintuils 2.26 was resolved in a later commit.
  • "error: impossible constraint in asm". When gcc5+ is configured with --enable-default-pie, in some cases there might be a need to use custom flags in some makefile(s), similar to either "CFLAGS += -fno-pie" or "CFLAGS := -fno-pie". Examples:


See also