bumblebee-3.2.1_p20190421-gcc10.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Author: Andreas Beckmann <anbe@debian.org>
  2. Description: fix FTBFS with gcc-10
  3. gcc-10 defaults to -fno-common
  4. see https://gcc.gnu.org/gcc-10/porting_to.html
  5. Bug-Debian: https://bugs.debian.org/957058
  6. --- a/src/bbconfig.h
  7. +++ b/src/bbconfig.h
  8. @@ -103,7 +103,7 @@ enum bb_pm_method {
  9. PM_VGASWITCHEROO,
  10. PM_METHODS_COUNT /* not a method but a marker for the end */
  11. };
  12. -const char *bb_pm_method_string[PM_METHODS_COUNT];
  13. +extern const char *bb_pm_method_string[PM_METHODS_COUNT];
  14. /* String buffer size */
  15. #define BUFFER_SIZE 1024
  16. --- a/src/switch/switching.h
  17. +++ b/src/switch/switching.h
  18. @@ -60,10 +60,10 @@ void switcheroo_off(void);
  19. /* number of switchers as defined in switching.c */
  20. #define SWITCHERS_COUNT 2
  21. -struct switching_method switching_methods[SWITCHERS_COUNT];
  22. +extern struct switching_method switching_methods[SWITCHERS_COUNT];
  23. /* A switching method that can be used or NULL if none */
  24. -struct switching_method *switcher;
  25. +extern struct switching_method *switcher;
  26. struct switching_method *switcher_detect(const char *name, struct switch_info);
  27. enum switch_state switch_status(void);
  28. --- a/src/bbsecondary.h
  29. +++ b/src/bbsecondary.h
  30. @@ -21,7 +21,7 @@
  31. #pragma once
  32. /* PCI Bus ID of the discrete video card */
  33. -struct pci_bus_id *pci_bus_id_discrete;
  34. +extern struct pci_bus_id *pci_bus_id_discrete;
  35. /// Start the X server by fork-exec, turn card on if needed.
  36. bool start_secondary(bool);
  37. --- a/src/switch/switching.c
  38. +++ b/src/switch/switching.c
  39. @@ -31,6 +31,8 @@ struct switching_method switching_method
  40. switcheroo_on, switcheroo_off}
  41. };
  42. +struct switching_method *switcher = NULL;
  43. +
  44. /**
  45. * Enumerates through available switching methods and try a method
  46. *
  47. --- a/src/bbsecondary.c
  48. +++ b/src/bbsecondary.c
  49. @@ -37,6 +37,9 @@
  50. #include "pci.h"
  51. #include "module.h"
  52. +/* PCI Bus ID of the discrete video card */
  53. +struct pci_bus_id *pci_bus_id_discrete;
  54. +
  55. /**
  56. * Substitutes DRIVER in the passed path
  57. * @param x_conf_file A path to be processed