Jump to content

Clover Bug/Issue Report and Patch

Clover Issue Bug Report Patch

  • Please log in to reply
2769 replies to this topic

#2761
apianti

apianti

    I have dementia!

  • Developers
  • 890 posts
  • Gender:Not Telling

This is not the case anymore. cross-gcc is built with clang from xcode. xcrun is used to find SDK root, and then passed to configure param --with-sysroot

 

Well, clang is modified gcc and gcc is link to the same binary...... Also depends on how you build the cross compiler. But you are forgetting that there are also parts of the project built with the native compiler not the cross compiler. It's not a good idea to change PATH unless you expect that the binaries in that path should always be called, which is definitely not the case. You never know what another script/executable is going to try to find, it's best to point to what you need and let the rest be found like it was intended.



#2762
Zenith432

Zenith432

    InsanelyMac Legend

  • Developers
  • 792 posts
  • Gender:Male

Also depends on how you build the cross compiler.

For building the cross-compiler, only thing needed in the path is /usr/bin/xcrun, of which there is only one. It finds xcode SDK root based on xcode-select, which is stored somewhere in /private/var. Then GCC configure takes SDK root as parameter --with-sysroot and will create makefiles that use build tools only under SDK root, not anything found in path.

#2763
apianti

apianti

    I have dementia!

  • Developers
  • 890 posts
  • Gender:Not Telling

For building the cross-compiler, only thing needed in the path is /usr/bin/xcrun, of which there is only one. It finds xcode SDK root based on xcode-select, which is stored somewhere in /private/var. Then GCC configure takes SDK root as parameter --with-sysroot and will create makefiles that use build tools only under SDK root, not anything found in path.

 

That's only one way to build the cross compiler. And you are incorrect xcrun modifies PATH for a subshell to point to the developer bin and SDK directories. Also it falls back to environmental variables to find that stuff....



#2764
Zenith432

Zenith432

    InsanelyMac Legend

  • Developers
  • 792 posts
  • Gender:Male

I'm talking about build_gcc7.sh.  It uses /usr/bin/xcrun only once to find the full pathname to xcode SDK root, which is stored in a file (or symlnk) somewhere under /private/var.  The full pathname to SDK root is then passed to GCC configure which generates makefiles with full pathnames for the build tools to use.



#2765
apianti

apianti

    I have dementia!

  • Developers
  • 890 posts
  • Gender:Not Telling

I'm talking about build_gcc7.sh.  It uses /usr/bin/xcrun only once to find the full pathname to xcode SDK root, which is stored in a file (or symlnk) somewhere under /private/var.  The full pathname to SDK root is then passed to GCC configure which generates makefiles with full pathnames for the build tools to use.

 

As I said that is only one way to build the cross compiler. You can't make a decision because you think everyone is going to do it exactly how you want. What if I already have another GCC and want to use it to build the cross compiler?

 

EDIT: Here's a great example. NASM in macOS sucks, but it needs to be in PATH or fails to compile stuff. You need to compile another NASM and have both. You can't stick the one you compiled in PATH because the original is in there. You should be able to draw the parallels.



#2766
Zenith432

Zenith432

    InsanelyMac Legend

  • Developers
  • 792 posts
  • Gender:Male

@apianti: I was responding to your post #2758.



#2767
apianti

apianti

    I have dementia!

  • Developers
  • 890 posts
  • Gender:Not Telling

Yes, I got that. I was trying to give you another example of why you need the prefixes. Because you need two different versions of some binaries. Yes, it's fine if you just use xcode to build the cross compiler, but if you use GCC (not from xcode) then you cannot add both to PATH. Therefore you cannot generate native and cross compiled without the prefix. Unless you are constantly going to switch back and forth between editing your PATH to change that one directory.



#2768
Slice

Slice

    InsanelyMac V.I.P.

  • Local Moderators
  • 6,804 posts
  • Gender:Male
  • Location:Moscow

Philip,

OsxFatBinaryDrv-64.efi is not a mandatory driver. It was mandatory for 10.7 and now is optional.

See

Attached File  Снимок экрана 2018-02-06 в 21.13.56.png   70.91KB   6 downloads

My system works including sleep/wake and development.



#2769
Philip Petev

Philip Petev

    InsanelyMac Sage

  • Coders
  • 332 posts
  • Gender:Male
  • Location:Haskovo, Bulgaria

I see RehabMan has reverted it in his fork. Should I change it back?

BTW you may want to see the Clover General discussion thread, there was a discussion about this driver.



#2770
apianti

apianti

    I have dementia!

  • Developers
  • 890 posts
  • Gender:Not Telling

No, he's saying move it from mandatory drivers64UEFI to drivers-Off so can be installed optionally.







Also tagged with one or more of these keywords: Clover, Issue, Bug, Report, Patch


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy